Spring Boot + WEB-INF

I have a very simple spring boot project with a dependency

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> 

When I create this, the web-inf folder is created in the target directory and packs everything into classes and the lib folder.

I want to have one xml file ("jboss-deployment-structure.xml") in the web-inf root directory ("web-inf / jboss-deployment-structure.xml"), where should it be placed in the src folder?

I tried to create the folder "public / jboss-deployment-structure.xml" in src but no luck.

+8
java spring spring-mvc jboss
source share
3 answers

Perhaps a little late, but to place your XML file inside WEB-INF, if you are using Maven, the correct placement will be:

 src/main/webapp/WEB-INF/jboss-deployment-structure.xml 
+10
source share

I had the same problem as when working with Spring boot projects.

This project usually comes with built-in modules such as Apache tomcat and ready to use Spring annotations.

For configuration changes and simplifying the configuration of a web application, I suggest creating from scratch. See This URL for more information:

http://projects.spring.io/spring-boot/

In my case, I changed to:

  <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> 

and I create my own structure.

0
source share

For a regular maven project if you need a structure

 target/WEB-INF/blabla.xml 

then you have to put

 src/main/resources/WEB-INF/blabla.xml 

I hope this helps.

0
source share

All Articles