MyBatis逆向工程有关错误
程序员文章站
2024-02-03 17:09:28
This is not a MyBatis Generator Configuration File;
log4j:WARN No appenders could be found for logger;
Mapped Statements collection already contains v... ......
this is not a mybatis generator configuration file
错误原因:dtd格式声明
log4j:warn no appenders could be found for logger
运行逆向工程是报错,错误原因:没有配置log4j,即缺少log4j.properties,在src目录下添加
mapped statements collection already contains value for cn.com.sm.mapper.usermapper.xxx
对逆行工程生成的文件进行测试是报错,错误原因:逆向工程生成的usermapper.xml配置文件中出现多个id重复的sql映射语句,删除重复的映射语句
注意:逆向工程多次生成同一个文件不会覆盖而是累加的形式(因为之前未配置log4j出现错误,重新进行逆向工程,所以出现了重复的映射语句),每次逆向之前都应删除以前的逆向工程文件