居然是pom文件依赖问题,明明已经引入了,重写一下就不报错了
换成
<!--mongodb-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
报错内容
“***************************
APPLICATION FAILED TO START
***************************
Description:
Field locationService in com.atguigu.daijia.map.controller.LocationController required a bean of type 'org.springframework.data.mongodb.core.MongoTemplate' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'org.springframework.data.mongodb.core.MongoTemplate' in your configuration.
推荐阅读:
1.环境搭建
3.司机端登录与认证
使用nacos启动GateWay8600端口被占用
乐尚代驾P185,Seata启动service-order报错i.s.c.r.netty.NettyClientChannelManager : Failed to get available servers: service.vgroupMapping.daijia_tx_group configuration item is required
2.乘客端登录
微信小程序登录报错40029
软件环境安装
微信小程序获取用户手机号教程视频
自定义注解实现AOP的登录校验
4.预估订单数据
行动消除疑虑