Java springboot Service中无法通过@Autowired导入Dao包
摘要:报错:Could not autowire. No beans of ‘UserMapper’ type found 原因是Dao为interface 无法通过@Bean加入到容器,也就无法通过@Autowired自动注入解决方法:Dao上加上@Repository 它用于将数据访问层 (DAO 层
阅读全文
posted @
2020-09-08 17:52
田坤坤
阅读(1404)
推荐(0) 编辑