Skip to content

Commit

Permalink
Java 8 to 11
Browse files Browse the repository at this point in the history
Spring Boot 2.4.0 to 2.5.0
Gradle 6.7 to 7.0.2
JCenter to MavenCentral
  • Loading branch information
jkazama committed May 26, 2021
1 parent 6d25142 commit 07a96eb
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 30 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2020 jkazama
Copyright (c) 2014-2021 jkazama

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ JSUG(日本Springユーザ会)の下記勉強会向けのサンプル実装で

- 2014/11/27 「SpringBootを用いたドメイン駆動設計」

> Spring Boot 2 の利用に伴い実装コードを Java8 へ切り替えています。 Java7 での実装コードを確認したいときは 1.x ブランチを参照してください。
> Spring Boot 2 の利用に伴い実装コードを Java11 へ切り替えています。 Java7 での実装コードを確認したいときは 1.x ブランチを参照してください。
本サンプルでは[SpringBoot](http://projects.spring.io/spring-boot/)[Lombok](http://projectlombok.org/)を利用してドメインモデリングの実装例を示します。実際に2007年くらいから現在に至るまで現場で利用されている実装アプローチなので、参考例の一つとしてみてもらえればと思います。
※JavaDocに記載をしていますが、サンプルに特化させているので実際の製品コードが含まれているわけではありません。
Expand Down Expand Up @@ -106,7 +106,7 @@ main
### コンソール

Windows/Macのコンソールから実行するにはGradleのコンソールコマンドで行います。
事前にJDK7以上のインストールが必要です
事前にJDK11以上のインストールが必要です

1. ダウンロードした*java-ddd*ディレクトリ直下へコンソールで移動
1. 「gradlew bootRun」を実行
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id "java"
id "eclipse"
id "org.springframework.boot" version "2.4.0"
id "io.spring.dependency-management" version "1.0.10.RELEASE"
id "org.springframework.boot" version "2.5.0"
id "io.spring.dependency-management" version "1.0.11.RELEASE"
}

ext['lombok.version'] = "1.18.16"
ext['lombok.version'] = "1.18.20"

version = "2.4.0"
version = "2.5.0"

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
sourceCompatibility = '11'
targetCompatibility = '11'

def defaultEncoding = 'UTF-8'
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding }
Expand All @@ -25,7 +25,7 @@ test {
}

repositories {
jcenter()
mavenCentral()
}

eclipseJdt.doLast {
Expand All @@ -49,5 +49,5 @@ dependencies {
}

wrapper {
gradleVersion = "6.7"
gradleVersion = "7.0.2"
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ 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
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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
Expand Down
22 changes: 4 additions & 18 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,28 +64,14 @@ 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%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down

0 comments on commit 07a96eb

Please sign in to comment.