Citrus框架:我正在获得NoSuchBeanDefinitionException来测试Christopher提供的JMS示例

时间:2018-07-22 07:29:34

标签: java citrus-framework

我是Citrus框架的新手。

我遇到以下错误:

  <script src="http://maps.google.com/maps/api/js?sensor=false">
</script>

<script type="text/javascript">
    var map;
    if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function (position) {
            var latitude = position.coords.latitude;
            var longitude = position.coords.longitude;
            var coords = new google.maps.LatLng(latitude, longitude);
            var mapOptions = {
                zoom: 15,
                center: coords,
                mapTypeControl: true,
                navigationControlOptions: {
                    style: google.maps.NavigationControlStyle.SMALL
                },
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(
            document.getElementById("mapContainer"), mapOptions
            );
            var marker = new google.maps.Marker({
                position: coords,
                map: map,
                title: "Your current location!"
            });

        });
    } else {
        alert("Geolocation API is not supported in your browser.");
    }

    function setUpClickListener(map) {
        // Attach an event listener to map display
        // obtain the coordinates and display in an alert box.
        map.addEventListener('tap', function (evt) {
            var coord = map.screenToGeo(evt.currentPointer.viewportX,
                evt.currentPointer.viewportY);
            alert('Clicked at ' + Math.abs(coord.lat.toFixed(4)) +
                ((coord.lat > 0) ? 'N' : 'S') +
                ' ' + Math.abs(coord.lng.toFixed(4)) +
                ((coord.lng > 0) ? 'E' : 'W'));
        });
    }

    var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));

    setUpClickListener(map);
</script>
<style type="text/css">
    #mapContainer
    {
        height: 500px;
        width: 800px;
        border: 10px solid #eaeaea;
    }
</style>
<div id="mapContainer">
</div>

我正在尝试将Citrus用于我正在从事的项目。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

<!DOCTYPE html> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <html> <style> </style> <head> <meta charset="utf-8" /> <link rel="shortcut icon" href="//#" /> <script type="text/javascript" src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script> <script type="text/javascript" src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script> </head> <body> <button type="button" onclick="clickme();">Click Me!</button> <div class="size"> <div class="tab"> <button class="tablinks" onclick="openCity(event, 'People')" id="defaultOpen">People</button> </div> <div id="People" class="tabcontent"> <div class="line1"> </div> </div> </div> </body> </html> <script> </script>告诉我,您在测试用例中使用的是名为NoSuchBeanDefinitionException的Citrus终结点组件,而该组件在您的Spring应用程序上下文配置中丢失。

您需要使用XML定义名为helloServiceEndpoint的Citrus端点,例如helloServiceEndpoint或在任何Java Spring bean配置类中,以citrus-context.xml标注的方法定义。

请检查您的Spring bean配置以及测试和配置中的具体bean命名。