mybatis添加扫描.xml文件
不要将mybatis 的.xml文件放在普通的java包下,要放在resources文件夹下。
entity扫描级别设为包
手动添加就是在sqlmapconfig.xml全局文件中加入
<mappers> <mapper resource="config/mapper/UserMapper.xml" /> </mappers>
不要将mybatis 的.xml文件放在普通的java包下,要放在resources文件夹下。
entity扫描级别设为包
手动添加就是在sqlmapconfig.xml全局文件中加入
<mappers> <mapper resource="config/mapper/UserMapper.xml" /> </mappers>