Create JAR file

Create Jar file to deploy your application into EC2 instance

  • Access EC2 instance by MobaXterm
  • Install JDK 17, or you can choose the other version of JDK which is suitable to your Java version.
sudo yum install java-17-amazon-corretto

Please refer to this link to choose your version of JDK.

  • We have already built a Jar file containing our application.
mvn clean install -DskipTests
  • Now, we again upload file Jar into EC2 and run our application Deployment

  • To run application, we enter this command:

java -jar restaurantmanagement-0.0.1-SNAPSHOT.jar
  • After run application: Deployment

  • Here we use postman to test API of our application Deployment