然后在mybatis-config.xml中
就会报错:Error creating bean with name 'empServiceImpl': Injection of autowired dependencies failed;......Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
如果去掉“<"mapper resource="org/xu/mapping/learnDataMapp.xml"/> ”运行就没错误了;
注:之前只有一个套只操作用户的mapping.xml,mapper.java,servic和serviceimpl,controller可以运行
后面想在写一套操作其他资源的mapping.xml,mapper.java,servic和serviceimpl,controller就运行不了了~~
在mapper中使用的@Repository
在ServiceImpl类使用 @Autowired调用相应的mapper接口
在controller中使用@Autowired调用相应的service接口
求大神指导,在做毕业设计时,遇到的问题~实在不知道如何解决,,谢谢