【问题标题】:EmbeddedServletContainerAutoConfiguration and ServerPropertiesAutoConfiguration in Spring Boot 2.0Spring Boot 2.0 中的 EmbeddedServletContainerAutoConfiguration 和 ServerPropertiesAutoConfiguration
【发布时间】:2018-09-18 20:02:55
【问题描述】:

当我们的项目从 Spring Boot 1.5 更新到 2.0 时,EmbeddedServletContainerAutoConfiguration 和 ServerPropertiesAutoConfiguration 不见了,尽管我们非常需要它们。当我在互联网上搜索这些课程时,我找不到这些课程的任何替代品。所以我的问题是:Spring Boot 2.0 是否删除了这些类?如果没有,他们被转移到了哪里?或者我该如何替换它们?

提前致谢。

【问题讨论】:

  • 为什么首先需要它们?看起来你正在做你一开始就不应该做的事情。类被删除和/或重命名(ServerPropertiesAutoConfiguration 已被删除,EmbeddedServletContainerAutoConfiguration 被重命名/拆分为不同的类)。

标签: java spring spring-mvc spring-boot updates


【解决方案1】:

EmbeddedServletContainerAutoConfiguration 在restructuring embedded web server packages 工作期间已由this commit 重命名为ServletWebServerFactoryAutoConfiguration。

ServerPropertiesAutoConfiguration 在the following issue 工作期间已被this commit 删除。现在使用创建这些属性对象 仅限@EnableConfigurationProperties。

注意:GitHub 可能需要一些时间才能显示特定的行号。

【讨论】:

    猜你喜欢
    • 2015-02-05
    • 2014-06-02
    • 1970-01-01
    • 2019-06-27
    • 2022-08-10
    • 2019-03-05
    • 2019-02-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多