Skip to content

Commit 24d00fa

Browse files
committed
Spring Boot Bean Validation example
1 parent 03f1680 commit 24d00fa

39 files changed

Lines changed: 2064 additions & 24 deletions

.idea/modules/spring-boot-testing.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patterns/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ dependencies {
1818
compileOnly 'org.projectlombok:lombok:1.18.2'
1919
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.0.1'
2020
testCompile 'org.assertj:assertj-core:2.6.0'
21+
compile files('lib/java-2.0.jar')
2122
}
2223

24+
compileJava.options.fork = true
25+
compileJava.options.forkOptions.executable = 'C:\\Program Files\\Java\\jdk-11\\bin\\javac.exe'
26+
27+

patterns/gradlew

Lines changed: 172 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

patterns/gradlew.bat

Lines changed: 84 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ include 'spring-boot:modular:booking-module'
1919
include 'spring-boot:modular:application'
2020
include 'spring-boot:spring-boot-testing'
2121
include 'spring-boot:spring-boot-logging'
22+
include 'spring-boot:validation'
2223

2324
include 'logging'
2425

@@ -28,5 +29,7 @@ include 'patterns'
2829

2930
include 'tools:jacoco'
3031

32+
include 'java'
33+
3134

3235

spring-boot/validation/.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.gradle
2+
/build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
5+
### STS ###
6+
.apt_generated
7+
.classpath
8+
.factorypath
9+
.project
10+
.settings
11+
.springBeans
12+
.sts4-cache
13+
14+
### IntelliJ IDEA ###
15+
.idea
16+
*.iws
17+
*.iml
18+
*.ipr
19+
/out/
20+
21+
### NetBeans ###
22+
/nbproject/private/
23+
/nbbuild/
24+
/dist/
25+
/nbdist/
26+
/.nb-gradle/
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
buildscript {
2+
ext {
3+
springBootVersion = '2.0.5.RELEASE'
4+
}
5+
repositories {
6+
mavenCentral()
7+
}
8+
dependencies {
9+
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
10+
}
11+
}
12+
13+
apply plugin: 'java'
14+
apply plugin: 'eclipse'
15+
apply plugin: 'org.springframework.boot'
16+
apply plugin: 'io.spring.dependency-management'
17+
18+
group = 'io.reflectoring'
19+
version = '0.0.1-SNAPSHOT'
20+
sourceCompatibility = 1.8
21+
22+
repositories {
23+
mavenCentral()
24+
}
25+
26+
27+
dependencies {
28+
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
29+
implementation('org.springframework.boot:spring-boot-starter-validation')
30+
implementation('org.springframework.boot:spring-boot-starter-web')
31+
runtimeOnly('com.h2database:h2')
32+
testImplementation('org.springframework.boot:spring-boot-starter-test')
33+
testImplementation('org.junit.jupiter:junit-jupiter-engine:5.0.1')
34+
35+
// these dependencies are needed when running with Java 11, since they
36+
// are no longer part of the JDK
37+
implementation('javax.xml.bind:jaxb-api:2.3.1')
38+
implementation('org.javassist:javassist:3.23.1-GA')
39+
}

0 commit comments

Comments
 (0)