自排雷 【悲伤蛙】【摸鱼】

文章描述了在SpringBoot应用中遇到的问题,包括BrandServiceImpl找不到BrandMapperbean,MySQLJDBC驱动的过时警告以及POST请求返回405错误。解决方案涉及配置Bean、更新数据库驱动和确保API代码的刷新。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这些是时间小偷吗,真的很偷时间啊

问题一

Field brandMapper in com.changgou.service.impl.BrandServiceImpl required a bean of type 'com.changgou.dao.BrandMapper' that could not be found.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2024-03-28 09:18:03.396 ERROR 10296 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field brandMapper in com.changgou.service.impl.BrandServiceImpl required a bean of type 'com.changgou.dao.BrandMapper' 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 'com.changgou.dao.BrandMapper' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:13015', transport: 'socket'

Process finished with exit code 1

 

解决一

解决二

发现原先包路径是错的

改掉

问题二

Loading class `com.mysql.jdbc.Driver'. This is deprecated.

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

解决

照着信息    com.mysql.jdbc.Driver --> com.mysql.cj.jdbc.Driver

问题三

post报405

解决

新的代码写完记得重跑一下 !!!!!!!!!!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值