1
votes

I'm currently new to deployment with Java and getting confused with jar and war. If someone can clear my couple of questions below

Do I need to convert my jar (Java spring services) to war and deploy on Jboss/Tomcat? or I should copy my jar on prod server and run java -jar "jar name" with nohup.

What should be the ideal production deployment approach?

It's an enterprise level application. Can someone please help me how do I deploy jar app in EC2 production server.

1
No, you need not. Yes, you could. Create a systemd daemon definition and timer to run the app, this is better than nohupMarged
What's systemd daemon definitionA Lovely
You should not forget that EC2 instances need to be considered shortlived, you should automate the deploymentMarged
@Marged can you explain me lil more please ?A Lovely

1 Answers

2
votes

Spring boot comes with an internal tomcat. So you do not need to deploy it inside a tomcat and neither do you need to convert it to a war.

You can just run it using the java - jar "jar name" command