takeaway
For project requirements, you need to modify the Tomcat version when upgrading or replacing the tomcat version.
use
steps
Modify the depend on
The pom.xml file is as follows:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<! -- Add tomcat version number information -->
<tomcat.version>9.0.43</tomcat.version>
</properties><-- add the following tomcat information -->Copy the code
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>${tomcat.version}</version>
</dependency>
</dependencies>
Copy the code
validation
Methods a
View the version of Tomcat in MAVEN in IDEA:
Way 2
View the console log as follows:
END
chaohen
:www.yuque.com/heioky
Do ~