I want to use Websphere liberty in spring boot application instead of tomcat server. If I am correct it is not supported out of the box. How can I configure spring boot/websphere liberty to achieve this?
Asked
Active
Viewed 7,135 times
3 Answers
7
Using the Liberty app accelerator you can download a zip containing a Maven buildable 'Spring Boot with Spring MVC' app as your starting point. Just run mvn install
and you'll get the app running at http://localhost:9080/myLibertyApp/

Jeremy Hughes
- 71
- 2
-
Thank you !!! Its running and creating a war file. I would like to get an executable jar from it. Is it possible? – Arun Abraham Mar 21 '16 at 22:29
-
2You can't embed WLP so no jar for you there, sorry. – Stephane Nicoll Mar 22 '16 at 08:33
-
I am trying to develop Microservices using Spring boot and want to build it as an executable jar with WAS liberty profile. Will Spring boot be supporting WLP out of the box in the future? Is it possible to customize Spring boot for WLP? – Arun Abraham Mar 23 '16 at 06:43
5
Actually, you can now create runnable jar files with WebSphere Liberty. You need v8.5.5.9 or higher. Create a runnable jar this way:
server package {server name} --archive={jar name}.jar --include=minify,runnable
Resultant jar can be run as you'd expect:
java -jar {jar name}.jar

thor
- 21,418
- 31
- 87
- 173

Chris Vignola
- 51
- 1
-
Thanks. It is working. If I add swagger dependency(io.springfox) or spring batch (spring-boot-starter-batch) to the pom the tests are failing and server is not starting. Is there any documentation for App Accelerator? I couldn't find one. – Arun Abraham Mar 25 '16 at 10:52
-
Here's the official documentation on [Running a Liberty server from a JAR file](http://www.ibm.com/support/knowledgecenter/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/rwlp_setup_jarserver.html?lang=en) – Jeremy Hughes Apr 04 '16 at 15:35
-
The above link is not working, updated link is https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_setup_jarserver.html – damndemon Feb 24 '20 at 10:03
0
Since very recently (May 2018) you can deploy a Spring Boot jar with Liberty, as it seems. See https://developer.ibm.com/wasdev/blog/2018/05/11/spring-boot-applications-on-liberty/. Haven't tried it out yet, though.

Bernd
- 370
- 4
- 16