Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
Last active October 18, 2016 19:12
Show Gist options
  • Select an option

  • Save mizanRahman/132946e5b81a9d634dc78351ee518b19 to your computer and use it in GitHub Desktop.

Select an option

Save mizanRahman/132946e5b81a9d634dc78351ee518b19 to your computer and use it in GitHub Desktop.
Spring Boot files
/*
** When a spring boot project need to build as war
*/
apply plugin: 'war'
war {
baseName = 'myapp'
version = '0.5.0'
}
repositories {
jcenter()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
...
}
/*
** When a spring boot project need to build as jar with embedded jetty
*/
configurations {
compile.exclude module: "spring-boot-starter-tomcat"
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:1.4.1.RELEASE")
compile("org.springframework.boot:spring-boot-starter-jetty:1.4.1.RELEASE")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment