mybatis bug 集锦

在利用 mybatis 生成对应数据库的映射的时候,报错信息如下

1 [ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate (default-cli) on project miaosha: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate failed: Cannot resolve classpath entry: /Program Files/IBM/SQLLIB/java/db2java.zip -> [Help 1]
2 [ERROR] 
3 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
4 [ERROR] Re-run Maven using the -X switch to enable full debug loggin

解决方法:注释掉从官方文档复制的

1 <classPathEntry location="/Program Files/IBM/SQLLIB/java/db2java.zip" />

在app 中自动配置 bean 的时候,IDEA 显示波浪形警告信息:

1 could not autowire. No beans of ‘UserDaoMapper’ type found.
2 Inspection info: Checks autowiring problems in a bean class

是因为 IDEA 在编译期间会为我们进行代码审查可以帮助我们发现一些错误信息,还可以设置不同的错误信息级别,在错误信息级别较高的时候进行高亮显示,不高的不进行提示。解决方法为在设置中修改:

Preference -> Editor -> inspections -> spring - spring core -> code -> autowired for bean class。

 

猜你喜欢

转载自www.cnblogs.com/dogeLife/p/11441080.html