Context root not taken into account #1859
-
I am wondering why our context root of our spring boot application is getting ignore when the application is deployed in droppins. The properties is in the app.properties like this server.servlet.context-path=/gap. We want to deploy in droppins in local in order to have hot reload functionnaly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think the problem is likely that if you want to use to configure the context root with Spring config When using the dropins folder to deploy, you need to then use the dropins/spring to use the optimized Spring Boot deployment. That all said, you can achieve hot reload when deploying to the apps folder, so I'm not sure why that's an advantage using dropins. With dropins you don't need server.xml config for your app, of course. This advantage is offset somewhat when deploying via the liberty-maven-plugin since this will generate a server XML config dropin for you, (so you still don't need to include it in your server.xml), though there are still some areas where liberty-maven-plugin still lacks complete support for the Spring Boot deployment (notably, dev mode). If you have any more questions, it would help if you included a simple recreate. Likewise, if you're trying to use liberty-maven-plugin to do some of this it'd probably help to see the pom.xml and server.xml if not a simple project. Hope that helps. |
Beta Was this translation helpful? Give feedback.
I think the problem is likely that if you want to use to configure the context root with Spring config
server.servlet.context-path=/gap
you need to use an optimized Spring Boot deployment rather than a normal WAR deployment (confusingly, it is possible to use a normal WAR deployment to run a Spring Boot application as this post highlights).When using the dropins folder to deploy, you need to then use the dropins/spring to use the optimized Spring Boot deployment.
That all said, you can achieve hot reload when deploying to the apps folder, so I'm not sure why that's an advantage using dropins. With dropins you don't need server.xml config for your app, of course. This advantage is offset …