Building & Running an Executable JAR
Learn Building & Running an Executable JAR (DevOps & Deployment, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is a Spring Boot Executable JAR? The Spring Boot executable jar contains the class files together with all the libraries the application needs to run and perform the task it was built for. Why do we use it? The user does not have to maintain the dependencies. They just execute it. Steps Create the Spring Boot project Add Maven dependencies Create the REST controller Run the application Open Postman and hit the request Create the executable jar Generate a Build Success Execute the jar at the command prompt See the "started successfully" message Open the browser and hit the URL Check the...