• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Deploying Spring Boot FATJAR?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am wondering if you can provide some information on how various companies are deploying Spring Boot FATJAR into their production environments? Are people using init.id, docker, etc..? If so what seems to be the most popular deployment mechanism?
 
author
Posts: 422
13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anywhere an executable JAR can run is a candidate for running JAR-based Spring Boot apps. The two most common I hear about are in Docker containers and in CloudFoundry. But if you can run an executable JAR, then any environment will work.

That said, you can still use Spring Boot in more traditional containers by building them into WAR files. Truly, the only major differences between a Spring Boot app in a JAR vs. one in a WAR is that the WAR version has an additional class that extends SpringBootServletInitializer and has a build file that produces a WAR instead of a JAR. The rest of the code can be pretty much the same. The subclass of SpringBootServletInitializer serves as the app's web.xml file, so there's no need to create a web.xml file...but this also means that you must deploy into a Servlet 3.0 (or higher) container. That shouldn't be much of an issue as Servlet 3.0 has been around for over 6 years. Only if you're working in an older container will that be a problem (and you should really consider updating).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic