Skip to content

Instantly share code, notes, and snippets.

@jenciso
Created December 20, 2021 02:48
Show Gist options
  • Save jenciso/dcfbcc301e173d86afbd128e7b8d13c1 to your computer and use it in GitHub Desktop.
Save jenciso/dcfbcc301e173d86afbd128e7b8d13c1 to your computer and use it in GitHub Desktop.
create-a-simple-spring-boot-application-with-gradle
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application.
id 'application'
// Spring Boot plugins
id 'org.springframework.boot' version '2.0.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.7.RELEASE'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-dependencies:2.0.5.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
components {
withModule('org.springframework:spring-beans') {
allVariants {
withDependencyConstraints {
// Need to patch constraints because snakeyaml is an optional dependency
it.findAll { it.name == 'snakeyaml' }.each { it.version { strictly '1.19' } }
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment