the server responded with a status of 404 (Not Found)
来源:互联网 发布:淘宝耳机店推荐 编辑:程序博客网 时间:2024/05/29 10:22
使用ajax跳转方法时,页面ctrl+shift+i调试报告了一个404错误,说找不到方法。页面地址栏直接指向方法的地址跳转也是404。目标方法是新增的,于是使用复制黏贴,确定各处方法名称一致之后,重启server。
调试时再次报错:
jquery.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
send @ jquery.min.js:4
这次的错误 在后台打印出了错误的原因:
Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) FROM web114_keyword_rele r where r.del_flag ='0' ' at line 1
出错的xml语句为:
<select id="countReleSet" parameterType="java.util.HashMap" resultType="java.lang.Integer"> SELECT COUNT (*) FROM web114_keyword_rele r where r.del_flag ='0' <if test="keyId != null"> and r.key_id = #{keyId,jdbcType=VARCHAR}, </if> <if test="storeId != null"> and r.store_id = #{storeId,jdbcType=VARCHAR} </if> </select>
一开始没反应过来错在哪里,就把语句扔到mysql里面跑了一遍,其实是count和(*)之间不应该有间隔,把语句改成
<select id="countReleSet" parameterType="java.util.HashMap" resultType="java.lang.Integer"> SELECT COUNT(*) FROM web114_keyword_rele r where r.del_flag ='0' <if test="keyId != null"> and r.key_id = #{keyId,jdbcType=VARCHAR}, </if> <if test="storeId != null"> and r.store_id = #{storeId,jdbcType=VARCHAR} </if> </select>
即可。简直是一个愚蠢的错误。。。。。。
写xml语句的时候,还是放到mysql里面跑一跑,确定没有语法问题再放进来。要不然后面报错了再调试还是挺讨厌的
阅读全文
0 0
- the server responded with a status of 404 (Not Found)
- jquery:Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found)
- 引入Bootstrap老是报错:the server responded with a status of 404 (Not Found)
- the server responded with a status of 406 (Not Acceptable)
- SrpingMVC==>Failed to load resource: the server responded with a status of 404(Not Found)
- (springmvc)页面找不到静态资源文件Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
- SprimgMVC:Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 404
- 微信小程序 the server responded with a status of 404 错误解决方法
- springmvc获取json Failed to load resource: the server responded with a status of 406 (Not Acceptable)
- Failed to load resource: the server responded with a status of 406 (Not Acceptable)问题的解决方案
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- failed to load resource the server responded with a status of 500 (internal server error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- PAT 甲级 1004. Counting Leaves
- 博弈模板(转载)
- EChart.js 简单入门
- struts2运行原理
- 在springMVC的web.xml中,DispatcherServlet使用/和/*的区别
- the server responded with a status of 404 (Not Found)
- JavaScript获取当前根目录
- 前端常用网站收藏(持续更新中。。。)
- 好看的Dialog加载动画
- 优化SQL步骤
- windows程序设计——输出文字
- 2017中国3D打印技术产业大会圆满落幕
- 电路设计_物联网芯片资讯——GPRS
- 算法导论程序26--开放寻址法(Python)