spring boot war without tomcat embedded

后端 未结 5 1650
孤街浪徒
孤街浪徒 2020-11-28 10:23

I want to create a war file without embedded tomcat with maven. Here the relevant part of my pom

...

    org.springframework.bo         


        
5条回答
  •  不知归路
    2020-11-28 11:05

    Following the Hint from M. Deinum I excluded the tomcat-depedency.

    With the following pom.xml (relevant snippet) a maven clean package has the result I want to get.

    ...
    
        org.springframework.boot
        spring-boot-starter-parent
        1.1.6.RELEASE
    
    
        
            org.springframework.boot
            spring-boot-starter-web
            
                
                    org.springframework.boot
                    spring-boot-starter-tomcat
                
            
        
        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        
        
        
            org.springframework.boot
            spring-boot-starter-tomcat
            provided
        
    
    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
        
    
    ...
    

    Warning for idea-user: You must activate "Include dependencies with the provided scope" in the run-configuration (see Unable to start spring-boot application in IntelliJ Idea for more information)

提交回复
热议问题