【问题标题】:Spring Boot not starting after upgrade升级后 Spring Boot 未启动
【发布时间】:2021-05-25 11:29:31
【问题描述】:

我刚刚从 Spring Boot 1.5.19 升级到 2.3.11 并从 Gradle 4.0 升级到 6.5

我可以构建项目,但是当我尝试运行时出现以下错误。

升级前运行良好。

*****************************
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.

【问题讨论】:

标签: java spring spring-boot gradle


【解决方案1】:

我不知道这个 bean 之前是如何连接到您的应用程序中的。我会说这绝对不是 Gradle 更新的问题,现在这个 bean 丢失了。

您应该确保following dependency 包含在您的项目中

// 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'

并验证配置是properly set up

【讨论】:

    猜你喜欢
    • 2020-09-15
    • 2016-12-08
    • 2018-10-31
    • 2022-01-09
    • 2020-04-14
    • 2016-12-16
    • 1970-01-01
    • 2011-01-06
    • 2022-07-19
    相关资源
    最近更新 更多