Created
December 20, 2021 02:48
-
-
Save jenciso/dcfbcc301e173d86afbd128e7b8d13c1 to your computer and use it in GitHub Desktop.
create-a-simple-spring-boot-application-with-gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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