大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
IntelliJ IDEA 开发Spring-mvc +mybits 项目时,启动tomcat后浏览器发送请求后收到了500服务器错误,错误如下:
成都创新互联公司主营覃塘网站建设的网络公司,主营网站建设方案,app开发定制,覃塘h5微信小程序开发搭建,覃塘网站营销推广欢迎覃塘等地区企业咨询
HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.creditease.proxymanager.dao.ProxyInfoDAO.getProxyInfo
type Exception report
message Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.creditease.proxymanager.dao.ProxyInfoDAO.getProxyInfo
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.creditease.proxymanager.dao.ProxyInfoDAO.getProxyInfo
org.springframework.web.servlet.FrameworkServlet.proce***equest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.creditease.proxymanager.dao.ProxyInfoDAO.getProxyInfo
网上搜了一下,问题出在没找到Mapper XML 文件
经过多次尝试发现出现这个问题的原因在于mybatis逆向生成mapper接口和mapper.xml文件放在了同一个文件夹中,在编译打包时没法加载mapper.xml文件。
方式一:
src/main/java
**/*.properties
**/*.xml
false