jetty: how to modify embedded jetty server start config in springboot? - spring-boot

I am using embedded jetty server in a springboot project. I need to set following configuration.
--module=jvm
--exec
-javaagent xxxx.jar
The document shows these configuration should set in start.ini. But embedded jetty does not have start.ini. Any idea about how to set start.ini properies in an embedded jetty?

Related

Start spring boot jar file as part of tomcat start

There is a way I can start the spring boot jar file as part of tomcat start(catalina.bat start).
I have a spring cloud api gateway which does not support war file deployment.
In a bare metal box, I have installed the tomcat, and as part of deployment I have converted all microservice into war file and able to deploy it into tomcat/webapp folder and up and running.
As spring cloud api gateway does not support war file, I kept this application with embed tomcat.
Now I need this jar file as well get started along with the tomcat [catalina.bat start].
In tomcat I have seen there is something shared.loader option in catalina.properties file.
I have kept the jar file in below path as shown below and when I try to start it, jar file is not getting picked up.
Need to know if there is a way to start the spring boot application [jar file] as part of tomcat [catalina.bat start] start.

How to I externalize my configuration for my spring-boot war application?

I have a spring-boot war application that is packaged using Maven, and I need to deploy it as docker image. Now I am done with creating docker image, my current problem is how do I pass external configuration? I am not running my spring-boot application as java -jar myapp.war. The person responsible for deploying this image will need to pass the path of the configuration file to docker image.

How to use Websphere liberty in spring boot application

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?
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/
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
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.

Spring Boot and Jboss wildfly setting the context root

I am trying to set the context root of my spring boot application. I'm deploying my application as a war file to Jboss.
i've tried to set the contextPath of what I'd like my root URL to be when deploying it to JBoss/Wildfly but it seems to get ignored. Unless I add a jboss-web.xml file setting a contex-root variable, my deployment url is always based on the war file name:
e.g. : myapp.war always deploys as : localhost:8080/myapp unless I use jboss-web. I've tried setting the contextPath in the server.properties file and it doesn't seem to work.
My question is should I be able to? I'm using the latest Spring Boot.
In other words, add your jboss-web.xml
file in this directory : /src/main/webapp/WEB-INF
Content of your jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/</context-root>
</jboss-web>
All of the server.* properties that Spring Boot supports only apply to the configuration of the embedded servlet container (Tomcat, Jetty, or Undertow). If you're deploying your Spring Boot app to a standalone server then you'll need to configure that server using whatever mechanisms it provides.

Remove application name after localhost in jetty

I build application using maven and run it using jetty plugin. Lets name of application be AAA, then, how can i configure jetty for entering on my application by URL http://localhost:PORT/ instead of http://localhost:PORT/AAA/
I saw answers when using Tomcat, but i am intresting in jetty.
You could set <contextPath> to / in the plugin configuration as documented here or here (based on the version of the plugin used.
<contextPath>/</contextPath>

Resources