install java:
- Updates the package index: sudo apt update
- Install the Java package: sudo apt install default-jdk
- Check Java version: java –version
You should see output similar to:
openjdk 19.0.1 2022-10-18
OpenJDK Runtime Environment Temurin-19.0.1+10 (build 19.0.1+10)
OpenJDK 64-Bit Server VM Temurin-19.0.1+10 (build 19.0.1+10, mixed mode, sharing)
install spring-boot:
This command will install SDKMAN, which is a development package manager that includes Spring Boot.
curl https://get.sdkman.io | bash
Once you have installed SDKMAN, you need to configure it by running the following command:
source "$HOME/.sdkman/bin/sdkman-init.sh"
Now you can install Spring Boot using the following command:
sdk install springboot
Once you have installed Spring Boot, you can verify that it is working correctly by running the following command:
spring --version
install maven:
sudo apt install maven
mvn --version
You should see output similar to the following:
Apache Maven 3.8.6
Once Java, Spring-Boot and Maven are installed, go to where the pom.xml is and run:
mvn spring-boot:run
in the background:
mvn spring-boot:run &