Article Directory
The idea professional edition and the idea community edition integrate Tomcat and deploy the war package
During the development process, due to the need to use the cloud platform, the development environment has to be reconfigured, and there are more or less other problems, but they are relatively easy to solve. When deploying the registration center Eureka, it should be because the version is too high that the built-in Tomcat of springboot cannot be used, so I chose to reduce the version and use the external Tomcat8 for deployment. Since I did not find a suitable solution on the Internet, I recorded one time.
1. Deployment of idea professional version
The deployment in the idea professional version was relatively smooth, and no problems were found.
1. I am using the community version of ideda2022, the steps of those lower versions should be roughly the same. For the idea2022 professional version with built-in Tomcat, you can add it directly at this time. Since I have already configured it, come back to summarize, and the operation steps are the same.
2. After entering, click Add Local Tomcat.
3. Configure the basic information of Tomcat, which internally specifies the name and path of Tomcat. JRE is the built-in jre of jdk, the idea has been selected, you only need to select the corresponding version.
4. Here you need to configure the information corresponding to the corresponding war package, click ok, and it can run normally when you go out.
2. Deployment of idea community edition
In the community version, because I couldn't find any relevant and accurate tutorials on the Internet, I kept reporting errors java.lang.IllegalArgumentException: Unknown attribute http://javax.xml.XMLConstants/property/accessExternalDTD
, but Baidu didn't have a relevant solution, and after 3 hours of trial and error, I finally got the correct solution.
1. Since the 2023 community version of idea is not configured with Tomcat, you need to install this plug-in first.
2. Add two jar packages of Tomcat to the idea library.
3. Since I have already configured it, come back to summarize, the operation steps are the same.
4. Configure Tomcat accordingly. After the configuration is complete, click ok to run the project normally.
3. Error cases
1. Add the jar package to the module.
2. Add the war package to the project, but the community version of the idea did not find the option of the war package, so I chose another one, but found that it had no effect.
3. Add the war package to the webapps in Tomcat. This is a pure deployment operation, and it does not work for the idea to deploy Tomcat.
记录每一个学习瞬间