Spring:Spring项目多接口实现类报错找不到指定类

spring可以通过applicationContext.xml进行配置接口实现类

applicationContext.xml中可以添加如下配置:

 

 

在application.properties中添加你的实现类配置

 

 

注意:在applicationContext.xml中配置后,不要用Spring的@Service注解标注实现类,因为Spring的@Service会自动加载标注的实现类!!!

posted @ 2019-11-20 11:33  怒吼的萝卜  阅读(961)  评论(0编辑  收藏  举报