mybatis
_時_
这个作者很懒,什么都没留下…
展开
-
No qualifying bean of type [com.zc.service.IFancyService] found for dependency
在使用spring mvc,mybatis时报以下错误: No qualifying bean of type [com.zc.service.IFancyService] found for dependency 这个原因是没有配置spring对包进行扫描,找不到注解; 解决方法:加上扫描配置 问题解决。原创 2015-08-01 12:23:03 · 20660 阅读 · 1 评论 -
Could not resolve type alias 'TableFancy'.
使用mybatis,spring,mvc时,报以下错误: Could not resolve type alias 'TableFancy'. Cause: java.lang.ClassNotFoundException: Cannot find class: TableFancy 原因可能是配置文件中类名写错了,如下: TableFancy 应该写为 Fancy 万恶题解决。原创 2015-08-03 15:20:19 · 9302 阅读 · 1 评论 -
Unknown system variable 'language'
在使用mybatis和spring时,报以下错误: Unknown system variable 'language' 原来是我的电脑的mysql版本是很早之前的,卸掉之前的版本,安装最新的版本。 问题解决。原创 2015-08-02 10:15:10 · 6937 阅读 · 0 评论 -
Request processing failed; nested exception is java.lang.NullPointerException
在使用mybatis和spring时报错: Request processing failed; nested exception is java.lang.NullPointerException 可能的原因是没有添加 @Autowired 注解,加上即可。 @Autowired private IFancyService fancyService;原创 2015-08-01 12:02:12 · 13698 阅读 · 0 评论 -
Could not find resource FancyMapper.xml
mybatis和spring整合加载mapper.xml文件: --> 报错: Could not find resource FancyMapper.xml 我将 FancyMapper.xml 文件放到 WEB-INF 目录和源包目录下都不行,都提示找不到。 最终才发现要放到其他源目录下: 这样使用下面代码就可以找到了:原创 2015-07-31 17:01:39 · 3831 阅读 · 0 评论 -
Invalid bound statement (not found)
mybatis报如下错误: org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherServlet] in context with path [/zc-beauty2] threw exception [Request processing failed; n原创 2015-08-21 16:18:02 · 11602 阅读 · 0 评论