错误信息:
Description:
Field customerInfoDao in com.hariexpress.cloud.service.impl.chat.CustomerServiceImpl required a bean named 'mongoTemplate' that could not be found.
Action:
Consider defining a bean named 'mongoTemplate' in your configuration.
解决方法:
1.首先检查maven中相关依赖是否添加,检查父类是否能install成功
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
2.查看各个模块的注解,尤其是mapper层(版本低的idea不写@Respority注解也不报错)
3.在pom文件中将build的spring-boot-maven-plugin注释掉