参考文章:https://stackoverflow.com/questions/43571505/how-to-find-the-interface-embeddedservletcontainercustomizer-in-spring-boot-2-0
我在用springboot 2.0时,发现配置服务器信息的代码原来在1.0时是重写EmbeddedServletContainerCustomizer 接口的实现,但是到2.0时这个类不见了,然后找到了上面这个文章里面的一个回帖有提到api已经变了。
新的配置需要实现WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>接口,分享给大家,也方便自己查阅。有问题可以留言讨论