这是依赖冲突了吗,jquery好像无法加载,前端页面没法给后台发送ajax,百思不得其解,日.

jsp截图()

img

按钮<button type="button" id="btnGetAll">查询所有GET</button>

//给  查询单个GET 按钮绑定单击事件
        $("#btnGetOne").click(function () {
            $.ajax({
                type: "GET",
                url: "/dog/" + $("#dogId").val(),//RESTful风格的API定义
                date: "",
                dataType: "json",
                success: function (vo) {//vo是封装的数据格式类
                    if (vo.code == 200) {
                        var obj = vo.obj;
                        alert("Date Saved: " + obj);
                        if (obj == "")
                            $("showResult").html("没有符合条件的数据!");
                        else
                            $("showResult").html(obj.dogId + "---" + obj.dogName + "----" + obj.location + "<br>");
                    } else {
                        $("showResult").html(vo.msg);
                    }
                }
            });

headers截图

img

上一张截图的页面

img

控制台截图

img

依赖截图

img

运行是用的tomcat插件

img

清缓存,换浏览器都试过,和这些应该没关系

如果你的jdk是1.8,建议使用tomcat8-9之间的版本,jquery无法加载可能你的路径出现了问题,你可以使用绝对路径httpxxxxxx

img


本地tomcat9就没问题