Spring Boot Bean Validation example

This commit is contained in:
Tom Hombergs
2018-10-14 14:48:57 +02:00
parent 03f1680103
commit 24d00fae37
39 changed files with 2064 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":spring-boot:spring-boot-testing" external.linked.project.path="$MODULE_DIR$/../../spring-boot/spring-boot-testing" external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="reflectoring.io" external.system.module.version="0.0.1-SNAPSHOT" type="JAVA_MODULE" version="4"> <module external.linked.project.id=":spring-boot:spring-boot-testing" external.linked.project.path="$MODULE_DIR$/../../spring-boot/spring-boot-testing" external.root.project.path="$MODULE_DIR$/../../tools/jacoco" external.system.id="GRADLE" external.system.module.group="reflectoring.io" external.system.module.version="0.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing"> <content url="file://$MODULE_DIR$/../../spring-boot/spring-boot-testing">

View File

@@ -18,5 +18,10 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.2' compileOnly 'org.projectlombok:lombok:1.18.2'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.0.1' testCompile 'org.junit.jupiter:junit-jupiter-engine:5.0.1'
testCompile 'org.assertj:assertj-core:2.6.0' testCompile 'org.assertj:assertj-core:2.6.0'
compile files('lib/java-2.0.jar')
} }
compileJava.options.fork = true
compileJava.options.forkOptions.executable = 'C:\\Program Files\\Java\\jdk-11\\bin\\javac.exe'

172
patterns/gradlew vendored Normal file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
patterns/gradlew.bat vendored Normal file
View File

@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -19,6 +19,7 @@ include 'spring-boot:modular:booking-module'
include 'spring-boot:modular:application' include 'spring-boot:modular:application'
include 'spring-boot:spring-boot-testing' include 'spring-boot:spring-boot-testing'
include 'spring-boot:spring-boot-logging' include 'spring-boot:spring-boot-logging'
include 'spring-boot:validation'
include 'logging' include 'logging'
@@ -28,5 +29,7 @@ include 'patterns'
include 'tools:jacoco' include 'tools:jacoco'
include 'java'

26
spring-boot/validation/.gitignore vendored Normal file
View File

@@ -0,0 +1,26 @@
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

View File

@@ -0,0 +1,39 @@
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'io.reflectoring'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-validation')
implementation('org.springframework.boot:spring-boot-starter-web')
runtimeOnly('com.h2database:h2')
testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('org.junit.jupiter:junit-jupiter-engine:5.0.1')
// these dependencies are needed when running with Java 11, since they
// are no longer part of the JDK
implementation('javax.xml.bind:jaxb-api:2.3.1')
implementation('org.javassist:javassist:3.23.1-GA')
}

View File

@@ -0,0 +1,735 @@
> Task :dependencies
------------------------------------------------------------
Root project
------------------------------------------------------------
annotationProcessor - Annotation processors and their dependencies for source set 'main'.
No dependencies
apiElements - API elements for main. (n)
No dependencies
archives - Configuration for archive artifacts.
No dependencies
bootArchives - Configuration for Spring Boot archive artifacts.
No dependencies
compile - Dependencies for source set 'main' (deprecated, use 'implementation' instead).
No dependencies
compileClasspath - Compile classpath for source set 'main'.
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot:2.0.5.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE
| | | | \--- org.springframework:spring-jcl:5.0.9.RELEASE
| | | \--- org.springframework:spring-context:5.0.9.RELEASE
| | | +--- org.springframework:spring-aop:5.0.9.RELEASE
| | | | +--- org.springframework:spring-beans:5.0.9.RELEASE
| | | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.0.9.RELEASE
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
| | | | +--- org.slf4j:slf4j-api:1.7.25
| | | | \--- org.apache.logging.log4j:log4j-api:2.10.0
| | | \--- org.slf4j:jul-to-slf4j:1.7.25
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.19
| +--- org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.8.13
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- com.zaxxer:HikariCP:2.7.9
| | | \--- org.slf4j:slf4j-api:1.7.25
| | \--- org.springframework:spring-jdbc:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-tx:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- javax.transaction:javax.transaction-api:1.2
| +--- org.hibernate:hibernate-core:5.2.17.Final
| | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
| | +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
| | +--- org.javassist:javassist:3.22.0-GA -> 3.23.1-GA
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.0.3.Final
| | +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
| | +--- dom4j:dom4j:1.6.1
| | \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
| | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
| +--- org.springframework.data:spring-data-jpa:2.0.10.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.0.10.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- org.springframework:spring-orm:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25
| \--- org.springframework:spring-aspects:5.0.9.RELEASE
| \--- org.aspectj:aspectjweaver:1.8.13
+--- org.springframework.boot:spring-boot-starter-validation -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| \--- org.hibernate.validator:hibernate-validator:6.0.12.Final
| +--- javax.validation:validation-api:2.0.1.Final
| +--- org.jboss.logging:jboss-logging:3.3.2.Final
| \--- com.fasterxml:classmate:1.3.4
+--- org.springframework.boot:spring-boot-starter-web -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-web:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6
| | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| | +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| +--- org.hibernate.validator:hibernate-validator:6.0.12.Final (*)
| +--- org.springframework:spring-web:5.0.9.RELEASE (*)
| \--- org.springframework:spring-webmvc:5.0.9.RELEASE
| +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-expression:5.0.9.RELEASE (*)
| \--- org.springframework:spring-web:5.0.9.RELEASE (*)
+--- javax.xml.bind:jaxb-api:2.3.1
| \--- javax.activation:javax.activation-api:1.2.0
\--- org.javassist:javassist:3.23.1-GA
compileOnly - Compile only dependencies for source set 'main'.
No dependencies
default - Configuration for default artifacts.
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot:2.0.5.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE
| | | | \--- org.springframework:spring-jcl:5.0.9.RELEASE
| | | \--- org.springframework:spring-context:5.0.9.RELEASE
| | | +--- org.springframework:spring-aop:5.0.9.RELEASE
| | | | +--- org.springframework:spring-beans:5.0.9.RELEASE
| | | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.0.9.RELEASE
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
| | | | +--- org.slf4j:slf4j-api:1.7.25
| | | | \--- org.apache.logging.log4j:log4j-api:2.10.0
| | | \--- org.slf4j:jul-to-slf4j:1.7.25
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.19
| +--- org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.8.13
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- com.zaxxer:HikariCP:2.7.9
| | | \--- org.slf4j:slf4j-api:1.7.25
| | \--- org.springframework:spring-jdbc:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-tx:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- javax.transaction:javax.transaction-api:1.2
| +--- org.hibernate:hibernate-core:5.2.17.Final
| | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
| | +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
| | +--- org.javassist:javassist:3.22.0-GA -> 3.23.1-GA
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.0.3.Final
| | +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
| | +--- dom4j:dom4j:1.6.1
| | \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
| | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
| +--- org.springframework.data:spring-data-jpa:2.0.10.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.0.10.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- org.springframework:spring-orm:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25
| \--- org.springframework:spring-aspects:5.0.9.RELEASE
| \--- org.aspectj:aspectjweaver:1.8.13
+--- org.springframework.boot:spring-boot-starter-validation -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| \--- org.hibernate.validator:hibernate-validator:6.0.12.Final
| +--- javax.validation:validation-api:2.0.1.Final
| +--- org.jboss.logging:jboss-logging:3.3.2.Final
| \--- com.fasterxml:classmate:1.3.4
+--- org.springframework.boot:spring-boot-starter-web -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-web:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6
| | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| | +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| +--- org.hibernate.validator:hibernate-validator:6.0.12.Final (*)
| +--- org.springframework:spring-web:5.0.9.RELEASE (*)
| \--- org.springframework:spring-webmvc:5.0.9.RELEASE
| +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-expression:5.0.9.RELEASE (*)
| \--- org.springframework:spring-web:5.0.9.RELEASE (*)
+--- javax.xml.bind:jaxb-api:2.3.1
| \--- javax.activation:javax.activation-api:1.2.0
+--- org.javassist:javassist:3.23.1-GA
\--- com.h2database:h2 -> 1.4.197
implementation - Implementation only dependencies for source set 'main'. (n)
+--- org.springframework.boot:spring-boot-starter-data-jpa (n)
+--- org.springframework.boot:spring-boot-starter-validation (n)
+--- org.springframework.boot:spring-boot-starter-web (n)
+--- javax.xml.bind:jaxb-api:2.3.1 (n)
\--- org.javassist:javassist:3.23.1-GA (n)
runtime - Runtime dependencies for source set 'main' (deprecated, use 'runtimeOnly' instead).
No dependencies
runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot:2.0.5.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE
| | | | \--- org.springframework:spring-jcl:5.0.9.RELEASE
| | | \--- org.springframework:spring-context:5.0.9.RELEASE
| | | +--- org.springframework:spring-aop:5.0.9.RELEASE
| | | | +--- org.springframework:spring-beans:5.0.9.RELEASE
| | | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.0.9.RELEASE
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
| | | | +--- org.slf4j:slf4j-api:1.7.25
| | | | \--- org.apache.logging.log4j:log4j-api:2.10.0
| | | \--- org.slf4j:jul-to-slf4j:1.7.25
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.19
| +--- org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.8.13
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- com.zaxxer:HikariCP:2.7.9
| | | \--- org.slf4j:slf4j-api:1.7.25
| | \--- org.springframework:spring-jdbc:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-tx:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- javax.transaction:javax.transaction-api:1.2
| +--- org.hibernate:hibernate-core:5.2.17.Final
| | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
| | +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
| | +--- org.javassist:javassist:3.22.0-GA -> 3.23.1-GA
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.0.3.Final
| | +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
| | +--- dom4j:dom4j:1.6.1
| | \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
| | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
| +--- org.springframework.data:spring-data-jpa:2.0.10.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.0.10.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- org.springframework:spring-orm:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25
| \--- org.springframework:spring-aspects:5.0.9.RELEASE
| \--- org.aspectj:aspectjweaver:1.8.13
+--- org.springframework.boot:spring-boot-starter-validation -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| \--- org.hibernate.validator:hibernate-validator:6.0.12.Final
| +--- javax.validation:validation-api:2.0.1.Final
| +--- org.jboss.logging:jboss-logging:3.3.2.Final
| \--- com.fasterxml:classmate:1.3.4
+--- org.springframework.boot:spring-boot-starter-web -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-web:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6
| | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| | +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| +--- org.hibernate.validator:hibernate-validator:6.0.12.Final (*)
| +--- org.springframework:spring-web:5.0.9.RELEASE (*)
| \--- org.springframework:spring-webmvc:5.0.9.RELEASE
| +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-expression:5.0.9.RELEASE (*)
| \--- org.springframework:spring-web:5.0.9.RELEASE (*)
+--- javax.xml.bind:jaxb-api:2.3.1
| \--- javax.activation:javax.activation-api:1.2.0
+--- org.javassist:javassist:3.23.1-GA
\--- com.h2database:h2 -> 1.4.197
runtimeElements - Elements of runtime for main. (n)
No dependencies
runtimeOnly - Runtime only dependencies for source set 'main'. (n)
\--- com.h2database:h2 (n)
testAnnotationProcessor - Annotation processors and their dependencies for source set 'test'.
No dependencies
testCompile - Dependencies for source set 'test' (deprecated, use 'testImplementation' instead).
No dependencies
testCompileClasspath - Compile classpath for source set 'test'.
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot:2.0.5.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE
| | | | \--- org.springframework:spring-jcl:5.0.9.RELEASE
| | | \--- org.springframework:spring-context:5.0.9.RELEASE
| | | +--- org.springframework:spring-aop:5.0.9.RELEASE
| | | | +--- org.springframework:spring-beans:5.0.9.RELEASE
| | | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.0.9.RELEASE
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
| | | | +--- org.slf4j:slf4j-api:1.7.25
| | | | \--- org.apache.logging.log4j:log4j-api:2.10.0
| | | \--- org.slf4j:jul-to-slf4j:1.7.25
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.19
| +--- org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.8.13
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- com.zaxxer:HikariCP:2.7.9
| | | \--- org.slf4j:slf4j-api:1.7.25
| | \--- org.springframework:spring-jdbc:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-tx:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- javax.transaction:javax.transaction-api:1.2
| +--- org.hibernate:hibernate-core:5.2.17.Final
| | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
| | +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
| | +--- org.javassist:javassist:3.22.0-GA -> 3.23.1-GA
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.0.3.Final
| | +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
| | +--- dom4j:dom4j:1.6.1
| | \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
| | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
| +--- org.springframework.data:spring-data-jpa:2.0.10.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.0.10.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- org.springframework:spring-orm:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25
| \--- org.springframework:spring-aspects:5.0.9.RELEASE
| \--- org.aspectj:aspectjweaver:1.8.13
+--- org.springframework.boot:spring-boot-starter-validation -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| \--- org.hibernate.validator:hibernate-validator:6.0.12.Final
| +--- javax.validation:validation-api:2.0.1.Final
| +--- org.jboss.logging:jboss-logging:3.3.2.Final
| \--- com.fasterxml:classmate:1.3.4
+--- org.springframework.boot:spring-boot-starter-web -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-web:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6
| | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| | +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| +--- org.hibernate.validator:hibernate-validator:6.0.12.Final (*)
| +--- org.springframework:spring-web:5.0.9.RELEASE (*)
| \--- org.springframework:spring-webmvc:5.0.9.RELEASE
| +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-expression:5.0.9.RELEASE (*)
| \--- org.springframework:spring-web:5.0.9.RELEASE (*)
+--- javax.xml.bind:jaxb-api:2.3.1
| \--- javax.activation:javax.activation-api:1.2.0
+--- org.javassist:javassist:3.23.1-GA
+--- org.springframework.boot:spring-boot-starter-test -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-test:2.0.5.RELEASE
| | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-test-autoconfigure:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-test:2.0.5.RELEASE (*)
| | \--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE (*)
| +--- com.jayway.jsonpath:json-path:2.4.0
| | +--- net.minidev:json-smart:2.3
| | | \--- net.minidev:accessors-smart:1.2
| | | \--- org.ow2.asm:asm:5.0.4
| | \--- org.slf4j:slf4j-api:1.7.25
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| +--- org.assertj:assertj-core:3.9.1
| +--- org.mockito:mockito-core:2.15.0
| | +--- net.bytebuddy:byte-buddy:1.7.9 -> 1.7.11
| | +--- net.bytebuddy:byte-buddy-agent:1.7.9 -> 1.7.11
| | \--- org.objenesis:objenesis:2.6
| +--- org.hamcrest:hamcrest-core:1.3
| +--- org.hamcrest:hamcrest-library:1.3
| | \--- org.hamcrest:hamcrest-core:1.3
| +--- org.skyscreamer:jsonassert:1.5.0
| | \--- com.vaadin.external.google:android-json:0.0.20131108.vaadin1
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-test:5.0.9.RELEASE
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| \--- org.xmlunit:xmlunit-core:2.5.1
\--- org.junit.jupiter:junit-jupiter-engine:5.0.1
+--- org.junit.platform:junit-platform-engine:1.0.1
| +--- org.junit.platform:junit-platform-commons:1.0.1 -> 1.1.1
| | \--- org.apiguardian:apiguardian-api:1.0.0
| \--- org.opentest4j:opentest4j:1.0.0
\--- org.junit.jupiter:junit-jupiter-api:5.0.1 -> 5.1.1
+--- org.apiguardian:apiguardian-api:1.0.0
+--- org.opentest4j:opentest4j:1.0.0
\--- org.junit.platform:junit-platform-commons:1.1.1 (*)
testCompileOnly - Compile only dependencies for source set 'test'.
No dependencies
testImplementation - Implementation only dependencies for source set 'test'. (n)
+--- org.springframework.boot:spring-boot-starter-test (n)
\--- org.junit.jupiter:junit-jupiter-engine:5.0.1 (n)
testRuntime - Runtime dependencies for source set 'test' (deprecated, use 'testRuntimeOnly' instead).
No dependencies
testRuntimeClasspath - Runtime classpath of source set 'test'.
+--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot:2.0.5.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE
| | | | \--- org.springframework:spring-jcl:5.0.9.RELEASE
| | | \--- org.springframework:spring-context:5.0.9.RELEASE
| | | +--- org.springframework:spring-aop:5.0.9.RELEASE
| | | | +--- org.springframework:spring-beans:5.0.9.RELEASE
| | | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.0.9.RELEASE
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
| | | | +--- org.slf4j:slf4j-api:1.7.25
| | | | \--- org.apache.logging.log4j:log4j-api:2.10.0
| | | \--- org.slf4j:jul-to-slf4j:1.7.25
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.19
| +--- org.springframework.boot:spring-boot-starter-aop:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | \--- org.aspectj:aspectjweaver:1.8.13
| +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- com.zaxxer:HikariCP:2.7.9
| | | \--- org.slf4j:slf4j-api:1.7.25
| | \--- org.springframework:spring-jdbc:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-tx:5.0.9.RELEASE
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- javax.transaction:javax.transaction-api:1.2
| +--- org.hibernate:hibernate-core:5.2.17.Final
| | +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
| | +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
| | +--- org.javassist:javassist:3.22.0-GA -> 3.23.1-GA
| | +--- antlr:antlr:2.7.7
| | +--- org.jboss:jandex:2.0.3.Final
| | +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
| | +--- dom4j:dom4j:1.6.1
| | \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
| | \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
| +--- org.springframework.data:spring-data-jpa:2.0.10.RELEASE
| | +--- org.springframework.data:spring-data-commons:2.0.10.RELEASE
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.slf4j:slf4j-api:1.7.25
| | +--- org.springframework:spring-orm:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | | +--- org.springframework:spring-jdbc:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-tx:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | \--- org.slf4j:slf4j-api:1.7.25
| \--- org.springframework:spring-aspects:5.0.9.RELEASE
| \--- org.aspectj:aspectjweaver:1.8.13
+--- org.springframework.boot:spring-boot-starter-validation -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| \--- org.hibernate.validator:hibernate-validator:6.0.12.Final
| +--- javax.validation:validation-api:2.0.1.Final
| +--- org.jboss.logging:jboss-logging:3.3.2.Final
| \--- com.fasterxml:classmate:1.3.4
+--- org.springframework.boot:spring-boot-starter-web -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| | +--- org.springframework:spring-web:5.0.9.RELEASE
| | | +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| | | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6
| | +--- com.fasterxml.jackson.core:jackson-core:2.9.6
| | \--- com.fasterxml.jackson.core:jackson-databind:2.9.6 (*)
| +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE
| | +--- javax.annotation:javax.annotation-api:1.3.2
| | +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| | +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34
| | \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.34
| +--- org.hibernate.validator:hibernate-validator:6.0.12.Final (*)
| +--- org.springframework:spring-web:5.0.9.RELEASE (*)
| \--- org.springframework:spring-webmvc:5.0.9.RELEASE
| +--- org.springframework:spring-aop:5.0.9.RELEASE (*)
| +--- org.springframework:spring-beans:5.0.9.RELEASE (*)
| +--- org.springframework:spring-context:5.0.9.RELEASE (*)
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-expression:5.0.9.RELEASE (*)
| \--- org.springframework:spring-web:5.0.9.RELEASE (*)
+--- javax.xml.bind:jaxb-api:2.3.1
| \--- javax.activation:javax.activation-api:1.2.0
+--- org.javassist:javassist:3.23.1-GA
+--- com.h2database:h2 -> 1.4.197
+--- org.springframework.boot:spring-boot-starter-test -> 2.0.5.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-test:2.0.5.RELEASE
| | \--- org.springframework.boot:spring-boot:2.0.5.RELEASE (*)
| +--- org.springframework.boot:spring-boot-test-autoconfigure:2.0.5.RELEASE
| | +--- org.springframework.boot:spring-boot-test:2.0.5.RELEASE (*)
| | \--- org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE (*)
| +--- com.jayway.jsonpath:json-path:2.4.0
| | +--- net.minidev:json-smart:2.3
| | | \--- net.minidev:accessors-smart:1.2
| | | \--- org.ow2.asm:asm:5.0.4
| | \--- org.slf4j:slf4j-api:1.7.25
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| +--- org.assertj:assertj-core:3.9.1
| +--- org.mockito:mockito-core:2.15.0
| | +--- net.bytebuddy:byte-buddy:1.7.9 -> 1.7.11
| | +--- net.bytebuddy:byte-buddy-agent:1.7.9 -> 1.7.11
| | \--- org.objenesis:objenesis:2.6
| +--- org.hamcrest:hamcrest-core:1.3
| +--- org.hamcrest:hamcrest-library:1.3
| | \--- org.hamcrest:hamcrest-core:1.3
| +--- org.skyscreamer:jsonassert:1.5.0
| | \--- com.vaadin.external.google:android-json:0.0.20131108.vaadin1
| +--- org.springframework:spring-core:5.0.9.RELEASE (*)
| +--- org.springframework:spring-test:5.0.9.RELEASE
| | \--- org.springframework:spring-core:5.0.9.RELEASE (*)
| \--- org.xmlunit:xmlunit-core:2.5.1
\--- org.junit.jupiter:junit-jupiter-engine:5.0.1
+--- org.junit.platform:junit-platform-engine:1.0.1
| +--- org.junit.platform:junit-platform-commons:1.0.1 -> 1.1.1
| | \--- org.apiguardian:apiguardian-api:1.0.0
| \--- org.opentest4j:opentest4j:1.0.0
\--- org.junit.jupiter:junit-jupiter-api:5.0.1 -> 5.1.1
+--- org.apiguardian:apiguardian-api:1.0.0
+--- org.opentest4j:opentest4j:1.0.0
\--- org.junit.platform:junit-platform-commons:1.1.1 (*)
testRuntimeOnly - Runtime only dependencies for source set 'test'. (n)
No dependencies
(*) - dependencies omitted (listed previously)
(n) - Not resolved (configuration is not meant to be resolved)
A web-based, searchable dependency report is available by adding the --scan option.
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

172
spring-boot/validation/gradlew vendored Normal file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
spring-boot/validation/gradlew.bat vendored Normal file
View File

@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -0,0 +1 @@
rootProject.name = 'validation'

View File

@@ -0,0 +1,41 @@
package io.reflectoring.validation;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
@Entity
public class Input {
@Id
@GeneratedValue
private Long id;
@Min(1)
@Max(10)
private int numberBetweenOneAndTen;
// Note that this is actually not a valid IP address pattern, since
// it allows values greater than 255 per octet.
@Pattern(regexp = "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$")
private String ipAddress;
public int getNumberBetweenOneAndTen() {
return numberBetweenOneAndTen;
}
public void setNumberBetweenOneAndTen(int numberBetweenOneAndTen) {
this.numberBetweenOneAndTen = numberBetweenOneAndTen;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
}

View File

@@ -0,0 +1,56 @@
package io.reflectoring.validation;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import io.reflectoring.validation.service.OnCreate;
import io.reflectoring.validation.service.OnUpdate;
@Entity
public class InputWithCustomValidator {
@Id
@GeneratedValue
@NotNull(groups = OnUpdate.class)
@Null(groups = OnCreate.class)
private Long id;
@Min(1)
@Max(10)
@Column
private int numberBetweenOneAndTen;
@IpAddress
@Column
private String ipAddress;
public int getNumberBetweenOneAndTen() {
return numberBetweenOneAndTen;
}
public void setNumberBetweenOneAndTen(int numberBetweenOneAndTen) {
this.numberBetweenOneAndTen = numberBetweenOneAndTen;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}

View File

@@ -0,0 +1,25 @@
package io.reflectoring.validation;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({ FIELD })
@Retention(RUNTIME)
@Constraint(validatedBy = IpAddressValidator.class)
@Documented
public @interface IpAddress {
String message() default "{IpAddress.invalid}";
Class<?>[] groups() default { };
Class<? extends Payload>[] payload() default { };
}

View File

@@ -0,0 +1,32 @@
package io.reflectoring.validation;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class IpAddressValidator implements ConstraintValidator<IpAddress, String> {
@Override
public boolean isValid(String value, ConstraintValidatorContext context) {
Pattern pattern = Pattern.compile("^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$");
Matcher matcher = pattern.matcher(value);
try {
if (!matcher.matches()) {
return false;
} else {
for (int i = 1; i <= 4; i++) {
int octet = Integer.valueOf(matcher.group(i));
if (octet > 255) {
return false;
}
}
return true;
}
} catch (Exception e) {
return false;
}
}
}

View File

@@ -0,0 +1,12 @@
package io.reflectoring.validation;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ValidationApplication {
public static void main(String[] args) {
SpringApplication.run(ValidationApplication.class, args);
}
}

View File

@@ -0,0 +1,39 @@
package io.reflectoring.validation.controller.controlleradvice;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.springframework.http.HttpStatus;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
@ControllerAdvice
class ErrorHandlingControllerAdvice {
@ExceptionHandler(ConstraintViolationException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ResponseBody
ValidationErrorResponse onConstraintValidationException(ConstraintViolationException e) {
ValidationErrorResponse error = new ValidationErrorResponse();
for (ConstraintViolation violation : e.getConstraintViolations()) {
error.getViolations().add(new Violation(violation.getPropertyPath().toString(), violation.getMessage()));
}
return error;
}
@ExceptionHandler(MethodArgumentNotValidException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
@ResponseBody
ValidationErrorResponse onMethodArgumentNotValidException(MethodArgumentNotValidException e) {
ValidationErrorResponse error = new ValidationErrorResponse();
for (FieldError fieldError : e.getBindingResult().getFieldErrors()) {
error.getViolations().add(new Violation(fieldError.getField(), fieldError.getDefaultMessage()));
}
return error;
}
}

View File

@@ -0,0 +1,17 @@
package io.reflectoring.validation.controller.controlleradvice;
import java.util.ArrayList;
import java.util.List;
public class ValidationErrorResponse {
private List<Violation> violations = new ArrayList<>();
public List<Violation> getViolations() {
return violations;
}
public void setViolations(List<Violation> violations) {
this.violations = violations;
}
}

View File

@@ -0,0 +1,21 @@
package io.reflectoring.validation.controller.controlleradvice;
public class Violation {
private final String fieldName;
private final String message;
public Violation(String fieldName, String message) {
this.fieldName = fieldName;
this.message = message;
}
public String getFieldName() {
return fieldName;
}
public String getMessage() {
return message;
}
}

View File

@@ -0,0 +1,7 @@
package io.reflectoring.validation.repository;
import io.reflectoring.validation.Input;
import org.springframework.data.repository.CrudRepository;
public interface ValidatingRepository extends CrudRepository<Input, Long> {
}

View File

@@ -0,0 +1,7 @@
package io.reflectoring.validation.repository;
import io.reflectoring.validation.InputWithCustomValidator;
import org.springframework.data.repository.CrudRepository;
public interface ValidatingRepositoryWithCustomValidator extends CrudRepository<InputWithCustomValidator, Long> {
}

View File

@@ -0,0 +1,4 @@
package io.reflectoring.validation.service;
public interface OnCreate {
}

View File

@@ -0,0 +1,4 @@
package io.reflectoring.validation.service;
public interface OnUpdate {
}

View File

@@ -0,0 +1,38 @@
package io.reflectoring.validation.service;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;
import java.util.Set;
import io.reflectoring.validation.Input;
import org.springframework.stereotype.Service;
@Service
public class ProgrammaticallyValidatingService {
private Validator validator;
public ProgrammaticallyValidatingService(Validator validator) {
this.validator = validator;
}
public void validateInput(Input input) {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
Validator validator = factory.getValidator();
Set<ConstraintViolation<Input>> violations = validator.validate(input);
if (!violations.isEmpty()) {
throw new ConstraintViolationException(violations);
}
}
public void validateInputWithInjectedValidator(Input input) {
Set<ConstraintViolation<Input>> violations = validator.validate(input);
if (!violations.isEmpty()) {
throw new ConstraintViolationException(violations);
}
}
}

View File

@@ -0,0 +1,17 @@
package io.reflectoring.validation.service;
import javax.validation.Valid;
import io.reflectoring.validation.Input;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@Service
@Validated
class ValidatingService {
void validateInput(@Valid Input input){
// do something
}
}

View File

@@ -0,0 +1,23 @@
package io.reflectoring.validation.service;
import javax.validation.Valid;
import io.reflectoring.validation.InputWithCustomValidator;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@Service
@Validated
class ValidatingServiceWithGroups {
@Validated(OnCreate.class)
void validateForCreate(@Valid InputWithCustomValidator input){
// do something
}
@Validated(OnUpdate.class)
void validateForUpdate(@Valid InputWithCustomValidator input){
// do something
}
}

View File

@@ -0,0 +1 @@
IpAddress.invalid=Invalid IP Address: "${validatedValue}"!

View File

@@ -0,0 +1,16 @@
package io.reflectoring.validation;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class IpAddressValidatorTest {
@Test
void test(){
IpAddressValidator validator = new IpAddressValidator();
assertTrue(validator.isValid("111.111.111.111", null));
assertFalse(validator.isValid("111.foo.111.111", null));
assertFalse(validator.isValid("111.111.256.111", null));
}
}

View File

@@ -0,0 +1,42 @@
package io.reflectoring.validation;
import javax.validation.ConstraintViolationException;
import io.reflectoring.validation.service.ProgrammaticallyValidatingService;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.junit.jupiter.api.Assertions.*;
@ExtendWith(SpringExtension.class)
@SpringBootTest
class ProgrammaticallyValidatingServiceTest {
@Autowired
private ProgrammaticallyValidatingService service;
@Test
void whenInputIsInvalid_thenThrowsException(){
Input input = new Input();
input.setNumberBetweenOneAndTen(0);
input.setIpAddress("invalid");
assertThrows(ConstraintViolationException.class, () -> {
service.validateInput(input);
});
}
@Test
void givenInjectedValidator_whenInputIsInvalid_thenThrowsException(){
Input input = new Input();
input.setNumberBetweenOneAndTen(0);
input.setIpAddress("invalid");
assertThrows(ConstraintViolationException.class, () -> {
service.validateInputWithInjectedValidator(input);
});
}
}

View File

@@ -0,0 +1,16 @@
package io.reflectoring.validation;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class ValidationApplicationTests {
@Test
public void contextLoads() {
}
}

View File

@@ -0,0 +1,38 @@
package io.reflectoring.validation.controller.parameters;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
@ExtendWith(SpringExtension.class)
@WebMvcTest(controllers = ValidateParametersController.class)
class ValidateParametersControllerTest {
@Autowired
private MockMvc mvc;
@Test
void whenPathVariableIsInvalid_thenReturnsStatus400() throws Exception {
mvc.perform(get("/validatePathVariable/3"))
.andExpect(status().isBadRequest());
}
@Test
void whenRequestParameterIsInvalid_thenReturnsStatus400() throws Exception {
mvc.perform(get("/validateRequestParameter")
.param("param", "3"))
.andExpect(status().isBadRequest());
}
@Test
void whenPathVariableIsValid_thenReturnsStatus200() throws Exception {
mvc.perform(get("/validatePathVariable/10"))
.andExpect(status().isOk());
}
}

View File

@@ -0,0 +1,76 @@
package io.reflectoring.validation.controller.requestbody;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.reflectoring.validation.Input;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import static org.assertj.core.api.Java6Assertions.assertThat;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
@ExtendWith(SpringExtension.class)
@WebMvcTest(controllers = ValidateRequestBodyController.class)
class ValidateRequestBodyControllerTest {
@Autowired
private MockMvc mvc;
@Autowired
private ObjectMapper objectMapper;
@Test
void whenInputIsInvalid_thenReturnsStatus400() throws Exception {
Input input = invalidInput();
String body = objectMapper.writeValueAsString(input);
mvc.perform(post("/validateBody")
.contentType("application/json")
.content(body))
.andExpect(status().isBadRequest());
}
private Input invalidInput() {
Input input = new Input();
input.setIpAddress("invalid");
input.setNumberBetweenOneAndTen(99);
return input;
}
@Test
void whenInputIsInvalid_thenReturnsStatus400WithErrorObject() throws Exception {
Input input = invalidInput();
String body = objectMapper.writeValueAsString(input);
MvcResult result = mvc.perform(post("/validateBody")
.contentType("application/json")
.content(body))
.andExpect(status().isBadRequest())
.andReturn();
assertThat(result.getResponse().getContentAsString()).contains("violations");
}
@Test
void whenInputIsValid_thenReturnsStatus200() throws Exception {
Input input = validInput();
String body = objectMapper.writeValueAsString(input);
mvc.perform(post("/validateBody")
.contentType("application/json")
.content(body))
.andExpect(status().isOk());
}
private Input validInput() {
Input input = new Input();
input.setIpAddress("255.255.255.255");
input.setNumberBetweenOneAndTen(10);
return input;
}
}

View File

@@ -0,0 +1,42 @@
package io.reflectoring.validation.repository;
import javax.persistence.EntityManager;
import javax.validation.ConstraintViolationException;
import io.reflectoring.validation.Input;
import io.reflectoring.validation.repository.ValidatingRepository;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.junit.jupiter.api.Assertions.*;
@ExtendWith(SpringExtension.class)
@DataJpaTest
class ValidatingRepositoryTest {
@Autowired
private ValidatingRepository repository;
@Autowired
private EntityManager entityManager;
@Test
void whenInputIsInvalid_thenThrowsException() {
Input input = invalidInput();
assertThrows(ConstraintViolationException.class, () -> {
repository.save(input);
entityManager.flush();
});
}
private Input invalidInput() {
Input input = new Input();
input.setNumberBetweenOneAndTen(0);
input.setIpAddress("invalid");
return input;
}
}

View File

@@ -0,0 +1,44 @@
package io.reflectoring.validation.repository;
import javax.persistence.EntityManager;
import javax.validation.ConstraintViolationException;
import io.reflectoring.validation.InputWithCustomValidator;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.assertj.core.api.Java6Assertions.assertThat;
@ExtendWith(SpringExtension.class)
@DataJpaTest
class ValidatingRepositoryWithCustomValidatorTest {
@Autowired
private ValidatingRepositoryWithCustomValidator repository;
@Autowired
private EntityManager entityManager;
@Test
void whenInputIsInvalid_thenThrowsException() {
InputWithCustomValidator input = invalidInput();
try {
repository.save(input);
entityManager.flush();
Assertions.fail("expected ConstraintViolationException");
} catch (ConstraintViolationException e) {
assertThat(e.getConstraintViolations()).hasSize(2);
}
}
private InputWithCustomValidator invalidInput() {
InputWithCustomValidator input = new InputWithCustomValidator();
input.setNumberBetweenOneAndTen(0);
input.setIpAddress("invalid");
return input;
}
}

View File

@@ -0,0 +1,43 @@
package io.reflectoring.validation.service;
import javax.validation.ConstraintViolationException;
import io.reflectoring.validation.Input;
import io.reflectoring.validation.service.ValidatingService;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ExtendWith(SpringExtension.class)
@SpringBootTest
class ValidatingServiceTest {
@Autowired
private ValidatingService service;
@Test
void whenInputIsValid_thenThrowsNoException(){
Input input = new Input();
input.setNumberBetweenOneAndTen(5);
input.setIpAddress("111.111.111.111");
service.validateInput(input);
// then no exception
}
@Test
void whenInputIsInvalid_thenThrowsException(){
Input input = new Input();
input.setNumberBetweenOneAndTen(0);
input.setIpAddress("invalid");
assertThrows(ConstraintViolationException.class, () -> {
service.validateInput(input);
});
}
}

View File

@@ -0,0 +1,45 @@
package io.reflectoring.validation.service;
import javax.validation.ConstraintViolationException;
import io.reflectoring.validation.InputWithCustomValidator;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.junit.jupiter.api.Assertions.*;
@ExtendWith(SpringExtension.class)
@SpringBootTest
class ValidatingServiceWithGroupsTest {
@Autowired
private ValidatingServiceWithGroups service;
@Test
void whenInputIsInvalidForCreate_thenThrowsException() {
InputWithCustomValidator input = validInput();
input.setId(42L);
assertThrows(ConstraintViolationException.class, () -> {
service.validateForCreate(input);
});
}
private InputWithCustomValidator validInput() {
InputWithCustomValidator input = new InputWithCustomValidator();
input.setNumberBetweenOneAndTen(1);
input.setIpAddress("111.111.111.111");
return input;
}
@Test
void whenInputIsInvalidForUpdate_thenThrowsException() {
InputWithCustomValidator input = validInput();
input.setId(null);
assertThrows(ConstraintViolationException.class, () -> {
service.validateForUpdate(input);
});
}
}

View File

@@ -39,30 +39,43 @@ build.finalizedBy jacocoTestReport
jacocoTestCoverageVerification { jacocoTestCoverageVerification {
violationRules { violationRules {
rule {
element = 'CLASS' rule {
limit { element = 'METHOD'
counter = 'LINE' limit {
value = 'COVEREDRATIO' counter = 'LINE'
minimum = 1.0 value = 'COVEREDRATIO'
minimum = 1.0
}
excludes = [
'io.reflectoring.coverage.part.PartlyCovered.partlyCovered(java.lang.String, boolean)',
]
} }
excludes = [
'io.reflectoring.coverage.part.PartlyCovered', // rule {
'io.reflectoring.coverage.ignored.*', // element = 'CLASS'
'io.reflectoring.coverage.part.NotCovered' // limit {
] // counter = 'LINE'
} // value = 'COVEREDRATIO'
rule { // minimum = 1.0
element = 'CLASS' // }
includes = [ // excludes = [
'io.reflectoring.coverage.part.PartlyCovered' // 'io.reflectoring.coverage.part.PartlyCovered',
] // 'io.reflectoring.coverage.ignored.*',
limit { // 'io.reflectoring.coverage.part.NotCovered'
counter = 'LINE' // ]
value = 'COVEREDRATIO' // }
minimum = 0.8 // rule {
} // element = 'CLASS'
} // includes = [
// 'io.reflectoring.coverage.part.PartlyCovered'
// ]
// limit {
// counter = 'LINE'
// value = 'COVEREDRATIO'
// minimum = 0.8
// }
// }
} }
} }