This is a simple Sprint Boot based Java application that can be built using Maven. Sprint Boot dependencies are handled using the pom.xml at the root directory of the repository.
This is a MVC architecture based application where controller returns a page with title and message attributes to the view.
Checkout the repo and move to the directory
git clone https://github.com/3034saurabhkumar/myFirstProject.git
cd myFirstProject
Execute the Maven targets to generate the artifacts
mvn clean package
The above maven target stores the artifacts to the target directory. You can either execute the artifact on your local machine
(or) run it as a Docker container.
** Note: To avoid issues with local setup, Java versions and other dependencies, I would recommend the docker way. **
Execute locally (Java 25 needed) and access the application on http://localhost:8080
java -jar target/spring-boot-web.jar
Build the Docker Image
docker build -t myFirstProject:v1 .
docker run -d -p 8010:8080 -t myFirstProject:v1
Hurray !! Access the application on http://<ip-address>:<port-number>
System Requirements
Java 17+ (Oracle JDK, OpenJDK, or AdoptOpenJDK)
Hardware Recommendations:
Minimum 2 GB RAM
2 CPU cores
sudo apt update && sudo apt install unzip -y
adduser sonarqube
wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-10.4.1.88267.zip
unzip *
chown -R sonarqube:sonarqube /opt/sonarqube
chmod -R 775 /opt/sonarqube
cd /opt/sonarqube/bin/linux-x86-64
./sonar.sh start
Hurray !! Now you can access the SonarQube Server on http://<ip-address>:9000