我正在尝试使用 ajax 调用 Web 服务。该服务已启动,它可以在 firefox 上的 RestClient 上显示结果,但是在 mi 应用程序调用中,给我状态错误“Pending”。
这是我的简单网络服务。
@Controller
@RequestMapping("/hello")
public class HelloWs {
@RequestMapping(value= "/helloWorld", method = RequestMethod.GET, headers = "Accept=application/xml, application/json")
        public @ResponseBody String  HelloWorld() {
            return "Hello Worldssss¡¡";
        }
这是我的ajax调用。
function hellowsfunction() {
    $.ajax({
        type: "GET",
        url:"http://localhost:8080/ehCS-ui/rest/hello/helloWorld",
        crossDomain: true,
        dataType: "JSON",
        headers : {Accept : "applicationjson","Access-Control-Allow-Origin" : "*"},
            success: function(msg) {
             var returnedData = jQuery.parseJSON(msg);
             $("#lblResult")
            .text(result)
            .slideUp("hide", function() { $(this).slideDown("slow") });
     },
      error: function (e) { 
            $("#lblResult").removeClass("loading");
            alert('failed:'+e);
            console.log(e);
             }
     });
怎么了?想法?¿请帮助。谢谢