错误信息 =>
org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named ‘departmentServiceImpl’ is expected to be of type ‘cn.xbao.crm.service.impl.DepartmentServiceImpl’ but was actually of type ‘com.sun.proxy.$Proxy48’
at org.springframework.beans.factory.support.DefaultListableBeanFactory.checkBeanNotOfRequiredType(DefaultListableBeanFactory.java:1524)
…
原因: 在Contorller层, Autowired错误地注入了实现类DepartmentServiceImpl, 而不是IDepartmentService;
解决: 在Controller层注入的是接口,而不是其实现类