Steps to run Spring Boot, Angular and MySQL Project

Subscribe our YouTube channel for latest project videos and tutorials Click Here

Posted By freeproject on April 4, 2022
  • Steps to Install Softwares
  • Step 1 : Uninstall all MySQL Softwares from Control Panel if you have.
    Step 2 : Uninstall all Java and Tomcat Server from control panel if you have
    Step 3 : Download and Install STS Link : https://spring.io/tools
    Step 4 : Download and Install NodeJS 14 Link : https://nodejs.org/dist/v14.16.1/node-v14.16.1-x64.msi
    Step 5 : Download and Install XAMP Server : https://drive.google.com/open?id=1BWn8AAlWfrc1S5O5ILfXj1ayC8Bh4DAV
    Step 6 : Open CMD and check node version Command : node --version
    Step 7 : Open XAMP Control Panel and start Apache and MySQL
    Step 8 : Open browser and open the URL : http://127.0.0.1/. It will show you the XAMP Server Home Page
  • Steps to run and configure angular/frontend part
  • Step 1 : Download and extract the project, there will be 3 things inside the extracted folder, 1st folder contains angular code, 2nd contains spring boot code and 3rd .sql file
    Step 2 : Open CMD and open angular folder there in CMD. Run Command : npm install (wait for installation)
    Step 3 : Install angular version 7 Command : npm install -g @angular/cli@7.2.2
    Step 4 : Run command : ng serve
    Step 5 : Open browser and open the URL : http://127.0.0.1:4200 . This will show you frontend
  • Steps to run and configure database part
  • Step 1 : Open the URL http://127.0.0.1/phpmyadmin and click on create database and create the database with same name as the sql file, it will be available into your extracted folder
    Step 2 : Choose the database from left sidepanel
    Step 3 : Click on Import and choose the sql file from extracted project folder
    Step 4 : Click on Go, all the tables will be imported into the database.
  • Steps to run and configure spring boot API part
  • Step 1 : Open STS
    Step 2 : Go on File Menu >> Open Projects From File System
    Step 3 : Open Spring Boot Project from extracted folder
    Step 4 : Click on Finish
    Step 5 : Right Click on project >> Run As >> Spring Boot App
    Step 6 : Check console : Project Started messages will be appear
    Step 7 : Open URL http://127.0.0.1:8080 to check project, URL is working or not.
    Step 8 : If URL works then open angular part : http://127.0.0.1:4200 to check all functionalities
  • Troubleshooting steps for Spring boot
  • If spring boot project does not run or does not show (Started Application statement) then follow below steps:
    Step 1 : Right click on project folder then Properties >> Java Compiler >> Check Enable Project Specific Settings and use JavaSE-1.8
    Step 2 : Go on Project Menu >> Update Maven Project (Wait for Build)
    Step 3 : Right Click on project >> Run As >> Spring Boot App
  • Steps to run project after restart
  • Step 1 : Start XAMP - Apache and MySQL
    Step 2 : Open CMD and run ng serve from angular folder
    Step 3 : Open STS Right Click on project >> Run As >> Spring Boot App
    Step 4 : Open the browser
    Step 5 : Open the URL http://127.0.0.1:4200
  • How to Add Swagger Document (Optional - Not Required)
  • Step 1 : Open pom.xml and add below code
    <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>1.2.32</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> Step 2 : Right click on project then go to Maven and Click on Update Project.
    Step 3 : Enable Force update of Snapshots/Release
    Step 4 : Click Ok
    Step 5 : Once update done then you can open swagger on http://127.0.0.1:8080/swagger-ui/index.html URL
Call FreeProjectz WhatsApp FreeProjectz