Angular 11 + Spring Boot Deployment in Apache Tomcat:
Table of Contents
Angular 11 + Spring Boot Deployment in Apache Tomcat:
Pre requisite:
- Make sure you have Apache Tomcat 8+ is installed / zip version is available in your machine.
- Do Maven/Gradle build and keep the war file ready. (Have jar file ? then try running that as java -jar projectname.jar to run)
- Do ng build –prod and keep the dist/project_name folder ready.
Angular 11 deployment in Apache Tomcat
Generate prod build for your angular 9 project
ng build --prod
Copy the dist/ folder content to the root of your Tomcat
Tomcat > webapps > paste the folder whatever you have copied inside the dist/ folder of your angular project.
Spring Boot War deployment in Apache Tomcat
Generate the prod war file of your spring boot project
mvn clean install
Copy the .war file to Tomcat > webapps folder.
Tomcat start
Just go to the path Tomcat > bin and run startup.exe to run the tomcat server.
If the server is started successfully, then you will be able to open your angular 9 project in this link,
Your project will be available in this port:
http://localhost:8080/
Spring boot project ports will be as per your configuration in the application.properties file.