报错信息:Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
报错原因分析:可能是多个SqlSessionFactory,spring 不知如何去应用SqlSessionFactory。
解决办法:只要在指定一个SqlSessionFactory 加一个注解:@Primary 就可以了。
代码贴出来