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

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

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

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

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

原文地址:https://www.cnblogs.com/nhdlb/p/11896656.html