java 发表于 2017-8-2 18:09:32

Could not autowire. No beans of … type found

在 Application.java 上加上扫描范围,如:
@ComponentScan({"com.example.mybatis.mysql.sqlmapper.*", "com.example.mybatis.mysql.model.*"})

java 发表于 2017-8-3 11:43:15

Invalid bound statement (not found): com.example.mybatis.mysql.dao.SysUserDao.getListCount",


注意扫描范围的配置

@ComponentScan({"com.example.myproject.*","com.example.mybatis.mysql.dao.*"})
@MapperScan({"com.example.mybatis.mysql.sqlmapper.*"})

页: [1]
查看完整版本: Could not autowire. No beans of … type found