How can I run the war file as a service on Windows? Actually, I want to run my war file when I start my machine. How to do it?
If your application is a spring boot application then you just refer this link:-
https://stackoverflow.com/a/58637513/8199738
If your application is not made up of spring boot then just follow the below steps:-
Execute the service.bat as follows to create a service.
service.bat install service_name
Open Services manager and you could see a service running with the service_name as you created.
when you select the service, you could see the options like start/stop/restart on the left side.
You can also make the service to run automatically whenever the system gets restarted. Select service -> Right Click -> Properties -> Startup Type -> Select Automatic.
Hope! it helps! Thanks!