If you are working on the front-end, you should not change the back-end service code easily. Based on this premise, let’s discuss.
Since it is a maven web project, you can use the maven pacakge command to package (you can consult if there is anything that needs special attention when packaging back-end children's shoes)
Copy target/project.war to tomcat’s webapps
Start up tomcat If there are changes to the backend code, you need to start it all over again
Another way is to add the tomcat plug-in in the pom.xml of the maven project
Run mvn tomcat7:run so you can access the backend service
Consider another situation:
If the backend is the spring-boot project, then you don’t need to do anything, just execute it directly in the project directory mvn spring-boot:run That’s it
First of all, if your project does not use an IDE, you need to compile it manually. It is very troublesome to compile the project without an IDE. Tomcat needs to run compiled class files, so you cannot specify an uncompiled project when using tomcat directly. of.
If you are working on the front-end, you should not change the back-end service code easily. Based on this premise, let’s discuss.
Since it is a maven web project, you can use the
maven pacakge
command to package(you can consult if there is anything that needs special attention when packaging back-end children's shoes)
Copy target/project.war to tomcat’s webapps
Start up
tomcat
If there are changes to the backend code, you need to start it all over again
Another way is to add the tomcat plug-in in the pom.xml of the maven project
Run
mvn tomcat7:run
so you can access the backend serviceConsider another situation:
If the backend is the spring-boot project, then you don’t need to do anything, just execute it directly in the project directory
mvn spring-boot:run
That’s itJust make it into a war package and throw it into the tomcatwebAPP directory
There is a bin directory under tomcat, and there is a start or something in it. Copy the project into the webapps folder
First of all, if your project does not use an IDE, you need to compile it manually. It is very troublesome to compile the project without an IDE. Tomcat needs to run compiled class files, so you cannot specify an uncompiled project when using tomcat directly. of.