启动springboot项目APPLICATION FAILED TO START

本文探讨了两个Spring Boot应用启动时遇到的问题:一是MoveServiceImpl缺少`MoveRntity`类型的参数,二是`MoveServiceImpl`构造函数需要`String`类型参数。提供了解决方案,包括检查配置是否定义了所需实体bean和明确指定String类型bean。

异常信息1

2022-01-02 20:03:33,821 ERROR LoggingFailureAnalysisReporter - 

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

Description:

Parameter 2 of constructor in com.rus.service.impl.MoveServiceImpl required a bean of type 'com.rus.entity.MoveRntity' that could not be found.


Action:

Consider defining a bean of type 'com.rus.entity.MoveRntity' in your configuration.

解决方案

entity中确实无参构造方法

异常信息2

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

Description:

Parameter 0 of constructor in \com.rus.service.impl.MoveServiceImpl required a bean of type 'java.lang.String' that could not be found.


Action:

Consider defining a bean of type 'java.lang.String' in your configuration.

解决方案

由于MoveServiceImpl是一个共同的基类
不能添加@service注解

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值