我有一个 spring boot 应用程序,我想始终使用最新的 tomcat 版本,或者更好的是给定主要和次要版本的最新补丁 tomcat 版本:
F.e 8 的最新版本或 8.5 的最新版本。 (如 8.5.32)
因此,如果我重建我的应用程序,我将获得最新的安全补丁。
我知道我可以在属性中手动给出一个具体版本。 但这很快就会过时,我不想一直手动调整它。
最佳答案
如果你使用 gradle 那么你可以使用这个配置来完成它:
compile('org.springframework.boot:spring-boot-starter-web') {
exclude module: "spring-boot-starter-tomcat"
}
compile 'org.apache.tomcat.embed:tomcat-embed-core:+'
compile 'org.apache.tomcat.embed:tomcat-embed-el:+'
compile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:+'
compile 'org.apache.tomcat.embed:tomcat-embed-websocket:+'
如果你想给特定的版本那么使用version+
关于security - Spring Boot 始终使用最新的 tomcat 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51533885/