I recently had to deploy a Spring Boot application as a windows service and am surprised how easy it was using winsw. I’d previously written about using procrun – Java Programs as Windows Services, but winsw is much easier
Im going to use the Spring IO “Serving Web Content” project as a starting point, so go to the web page and download the example from git or as a zip file.
We can then see our application running –
<?xml version="1.0" encoding="UTF-8"?>
<description>gs-serving-web-content Windows Service</description>
I looked at procrun as an alternative wrapper for Spring Boot – but couldnt get it to work. It probably can – but needs more time.
Im really impressed with winsw for installing Spring boot applications as windows services. Its really simple, and you can pass external application.properties files in through the xml configuration