居然是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.司机端登录与认证
2.乘客端登录
使用nacos启动GateWay8600端口被占用
Base64格式的用法
乐尚代驾P185,Seata启动service-order报错i.s.c.r.netty.NettyClientChannelManager : Failed to get available servers: service.vgroupMapping.daijia_tx_group configuration item is required
微信小程序登录报错40029
15.优惠券
8.分布式事务
软件环境安装
行动消除疑虑