forked from pkainulainen/spring-batch-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Spring example: Getting the Required dependencies with Gradle
- Loading branch information
1 parent
716f8f6
commit 751f78e
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '2.3.1.RELEASE' apply false | ||
id 'io.spring.dependency-management' version '1.0.9.RELEASE' | ||
id 'war' | ||
id "org.gretty" version "3.0.3" | ||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
//We need to use this repository because at the moment the JCenter | ||
//Maven repository doesn't have the latest version (3.0.3) of the gretty-runner-jetty94 | ||
//dependency. | ||
maven { | ||
url 'https://repo.spring.io/plugins-release/' | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation( | ||
'org.slf4j:slf4j-api', | ||
'org.liquibase:liquibase-core', | ||
'com.zaxxer:HikariCP', | ||
'org.springframework:spring-aspects', | ||
'org.springframework:spring-context-support', | ||
'org.springframework:spring-jdbc', | ||
'org.springframework:spring-webmvc', | ||
'org.springframework.batch:spring-batch-core' | ||
) | ||
runtimeOnly( | ||
'org.apache.logging.log4j:log4j-api', | ||
'org.apache.logging.log4j:log4j-core', | ||
'org.apache.logging.log4j:log4j-slf4j-impl', | ||
//We need to add this because of Gretty :( This leads | ||
//into a situation where multiple SLF4J bindings | ||
//are present in the classpath, but I think that | ||
//this is an acceptable compromise because otherwise | ||
//the application won't start. | ||
'ch.qos.logback:logback-classic', | ||
'com.h2database:h2' | ||
) | ||
} |
2 changes: 2 additions & 0 deletions
2
getting-required-dependencies/spring/src/main/webapp/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This directory exists only because we don't want that the Jetty throws an exception | ||
when it's started. |