Exclude tomcat embed from spring-boot-starter-web in Gradle




Asked on April 01, 2015
I am using Gradle. How to exclude tomcat embed from spring-boot-starter-web. My dependencies are 
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web:1.2.2.RELEASE'
compile 'jstl:jstl:1.2'
}




Replied on April 01, 2015
To exclude tomcat embed from runtime use 

dependencies {
compile 'org.springframework.boot:spring-boot-starter-web:1.2.2.RELEASE'
compile 'jstl:jstl:1.2'
configurations {
    runtime.exclude module: 'spring-boot-starter-tomcat'
}

and if you want to exclude from compile time, you can change it as

configurations {
    compile.exclude module: 'spring-boot-starter-tomcat'
}


Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us