Java 升级后未启动Spring引导
我刚刚从Spring Boot 1.5.19升级到2.3.11,从Gradle 4.0升级到6.5 我可以获得要构建的项目,但当我尝试运行时,会出现以下错误 这在升级之前运行良好Java 升级后未启动Spring引导,java,spring,spring-boot,gradle,Java,Spring,Spring Boot,Gradle,我刚刚从Spring Boot 1.5.19升级到2.3.11,从Gradle 4.0升级到6.5 我可以获得要构建的项目,但当我尝试运行时,会出现以下错误 这在升级之前运行良好 ***************************** APPLICATION FAILED TO START ***************************** Description: Parameter 1 of constructor in controllers.IndexControll
*****************************
APPLICATION FAILED TO START
*****************************
Description:
Parameter 1 of constructor in controllers.IndexController required a bean of type 'org.springframework.mail.javamail.JavaMailSenderImpl' that could not be found.
我不知道这个bean以前是如何连接到您的应用程序中的。我想说,这绝对不是Gradle更新的问题,现在这个bean丢失了 你应该确保你的项目中包含了
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version: '2.5.0'
并验证配置是否正确。!嗨,欢迎!(这并不是那么简单……而且“可以让项目进行构建”的意思是:测试很糟糕!)