org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'conversationServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conversationMapper' defined in file [E:\program\dianxiaosheng\erp_purchase\target\classes\com\erp\module\conversation\mapper\ConversationMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
sprintboot运行项目的时候报的这个错,百度搜索看到有文章说是Controller或者xml有重名的方法。也有说是启动类处的 @SpringBootApplication(scanBasePackages = {“com.erp”}) 删除括号的内容就可以了。找了一个上午。。。。。
解决方法:
把启动类的@MapperScan改为@ComponentScan就可以了!!!!!
小伙伴帮我找的……辛苦了