When i deploy Spring boot application in Wildfly.

I get following web context which is

2021-01-19 08:05:14,620 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 161) Initializing Mojarra 2.3.9.SP01 for context '/gerp-tasks-rest-0.0.1-SNAPSHOT-wildfly10'
2021-01-19 08:05:15,961 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 161) WFLYUT0021: Registered web context: '/gerp-tasks-rest-0.0.1-SNAPSHOT-wildfly10' for server 'default-server'

This makes my URL somewhat like:

https://badardata.qa.shintegrator.cosng.net/gerp-tasks-rest-0.0.1-SNAPSHOT-wildfly10/tasks/all

How can i change web context url while deploy Spring Boot project in wildfly?

Structure of project is somewhat like below:

enter image description here

1

There are 1 answers

0
saver On

As you know, by default the application context path is the same as the war name, for customization context path you should create jboss-web.xml inside src/main/webapp/WEB-INF folder:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <context-root>terptasks</context-root>
</jboss-web>