是的,我认为使用Spring Boot配置是这里的最佳选择。要使用特定的tomcat版本,您应该执行以下步骤:
1-确保
<parent>在pom.xml 中将spring boot作为项目:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
2-添加
tomcat.version到
<properties>:
<properties> ... <tomcat.version>8.5.35</tomcat.version> ...</properties>
就这样,导入新的依赖项,应用程序应以您在步骤2中指定的版本作为嵌入式Tomcat运行。
话虽如此,请注意某些tomcat版本存在一些问题。我建议您,如果要使用8.5.X版本,请使用我测试过的8.5.35,它可以正常工作。
希望这对您有所帮助。



