Skip to content

Spring Boot Local Development Setup

Milos Biljanovic edited this page Aug 6, 2019 · 2 revisions

Steps for setting up backend (Spring Boot) project on Windows

Prerequisites

  • Java JDK 11.0.4
  • Maven 3.6.1

Steps to run the project

  1. Java JDK

    • Download and Install Java 11 Oracle SDK (not free for production)
    • Add environment variable of installed JDK (either option is fine)
      • Add JAVA_HOME : path\jdk-11.0.4
      • Add Java to Path : path\jdk-11.0.4\bin

    Above step is needed for Maven in order to recognize where Java is located

  2. Maven

    • Download Maven
    • Install it by unpacking it
    • Add Maven to Path environment variable: path\apache-maven-3.6.1\bin
  3. Start the application

    • Clone git repo
    • Open in terminal spring-react/spring
    • Run mvn spring-boot:run
    • As a result application will run on port 8080

Steps to import and run project from Eclipse

Prerequisites

  • Java JDK 11.0.4
  • Maven 3.6.1
  • Eclipse 2019-06-R
  1. Java JDK

    • Download and Install Java 11 Oracle SDK (not free for production)
    • Add environment variable of installed JDK (either option is fine)
      • Add JAVA_HOME : path\jdk-11.0.4
      • Add Java to Path : path\jdk-11.0.4\bin

    Above step is needed for Maven in order to recognize where Java is located

  2. Maven

    • Download Maven
    • Install by unpacking
    • Add Maven to Path environment variable: path\apache-maven-3.6.1\bin
  3. Eclipse

    • Download Eclipse
    • Install by unpacking
    • Run Eclipse
    • Create a new Workspace Spring React Guide
    • Set Maven location: Window>Preferences>Maven>Installations>Add Select folder with unpacked maven from step 2
  4. Clone git repo

  5. Running Project

    • Running with Maven
      • Right click on the project
      • Run As
      • Maven build...
      • For goal enter spring-boot:run
      • Run
        • This will pull dependencies if anything is missing
    • Running as Java application
      • Right click on the project
      • Run As
      • Java Application
      • Find class EvolvingTodoApplication.java
        • This will not pull dependencies if anything is missing (to pull dependencies build workspace or execute maven goal clean install)
    • As a result application will run on port 8080