Skip to content

Commit 0962ed7

Browse files
patbaumgartnerdsyer
authored andcommitted
Updating dependencies and docker containers to current versions
See #1157
1 parent cc46671 commit 0962ed7

File tree

20 files changed

+247
-152
lines changed

20 files changed

+247
-152
lines changed

.mvn/wrapper/maven-wrapper.jar

9 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3-
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

build.gradle

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
plugins {
2-
id 'org.springframework.boot' version '3.0.1'
3-
id 'io.spring.dependency-management' version '1.1.0'
42
id 'java'
3+
id 'org.springframework.boot' version '3.0.4'
4+
id 'io.spring.dependency-management' version '1.1.0'
5+
id 'org.graalvm.buildtools.native' version '0.9.20'
56
}
67

78
apply plugin: 'java'
@@ -15,7 +16,7 @@ repositories {
1516
}
1617

1718
ext.webjarsFontawesomeVersion = "4.7.0"
18-
ext.webjarsBootstrapVersion = "5.1.3"
19+
ext.webjarsBootstrapVersion = "5.2.3"
1920

2021
dependencies {
2122
implementation 'org.springframework.boot:spring-boot-starter-cache'

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "2.2"
22

33
services:
44
mysql:
5-
image: mysql:5.7
5+
image: mysql:8.0
66
ports:
77
- "3306:3306"
88
environment:
@@ -14,7 +14,7 @@ services:
1414
volumes:
1515
- "./conf.d:/etc/mysql/conf.d:ro"
1616
postgres:
17-
image: postgres:14.1
17+
image: postgres:15.2
1818
ports:
1919
- "5432:5432"
2020
environment:

gradle/wrapper/gradle-wrapper.jar

1.19 KB
Binary file not shown.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

+6
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ set -- \
205205
org.gradle.wrapper.GradleWrapperMain \
206206
"$@"
207207

208+
# Stop when "xargs" is not available.
209+
if ! command -v xargs >/dev/null 2>&1
210+
then
211+
die "xargs is not available"
212+
fi
213+
208214
# Use "xargs" to parse quoted args.
209215
#
210216
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

+8-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,7 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%
3131

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
43+
if %ERRORLEVEL% equ 0 goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7575

7676
:end
7777
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
78+
if %ERRORLEVEL% equ 0 goto mainEnd
7979

8080
:fail
8181
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8282
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
83+
set EXIT_CODE=%ERRORLEVEL%
84+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
85+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
86+
exit /b %EXIT_CODE%
8587

8688
:mainEnd
8789
if "%OS%"=="Windows_NT" endlocal

mvnw

+13-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
1010
#
11-
# https://www.apache.org/licenses/LICENSE-2.0'
11+
# https://www.apache.org/licenses/LICENSE-2.0
1212
#
1313
# Unless required by applicable law or agreed to in writing,
1414
# software distributed under the License is distributed on an
@@ -36,6 +36,10 @@
3636

3737
if [ -z "$MAVEN_SKIP_RC" ] ; then
3838

39+
if [ -f /usr/local/etc/mavenrc ] ; then
40+
. /usr/local/etc/mavenrc
41+
fi
42+
3943
if [ -f /etc/mavenrc ] ; then
4044
. /etc/mavenrc
4145
fi
@@ -145,7 +149,7 @@ if [ -z "$JAVACMD" ] ; then
145149
JAVACMD="$JAVA_HOME/bin/java"
146150
fi
147151
else
148-
JAVACMD="`which java`"
152+
JAVACMD="`\\unset -f command; \\command -v java`"
149153
fi
150154
fi
151155

@@ -212,9 +216,9 @@ else
212216
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213217
fi
214218
if [ -n "$MVNW_REPOURL" ]; then
215-
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
219+
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
216220
else
217-
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
221+
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
218222
fi
219223
while IFS="=" read key value; do
220224
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
@@ -233,9 +237,9 @@ else
233237
echo "Found wget ... using wget"
234238
fi
235239
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
236-
wget "$jarUrl" -O "$wrapperJarPath"
240+
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
237241
else
238-
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
242+
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
239243
fi
240244
elif command -v curl > /dev/null; then
241245
if [ "$MVNW_VERBOSE" = true ]; then
@@ -305,6 +309,8 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
305309

306310
exec "$JAVACMD" \
307311
$MAVEN_OPTS \
312+
$MAVEN_DEBUG_OPTS \
308313
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
309-
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
314+
"-Dmaven.home=${M2_HOME}" \
315+
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
310316
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

mvnw.cmd

+19-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@REM "License"); you may not use this file except in compliance
88
@REM with the License. You may obtain a copy of the License at
99
@REM
10-
@REM https://www.apache.org/licenses/LICENSE-2.0'
10+
@REM https://www.apache.org/licenses/LICENSE-2.0
1111
@REM
1212
@REM Unless required by applicable law or agreed to in writing,
1313
@REM software distributed under the License is distributed on an
@@ -46,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
4646
@REM Execute a user defined script before this one
4747
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
4848
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
49-
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
50-
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49+
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
50+
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
5151
:skipRcPre
5252

5353
@setlocal
@@ -120,9 +120,9 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120120
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121121
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122122

123-
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
123+
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
124124

125-
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
125+
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126126
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127127
)
128128

@@ -134,7 +134,7 @@ if exist %WRAPPER_JAR% (
134134
)
135135
) else (
136136
if not "%MVNW_REPOURL%" == "" (
137-
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
137+
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
138138
)
139139
if "%MVNW_VERBOSE%" == "true" (
140140
echo Couldn't find %WRAPPER_JAR%, downloading it ...
@@ -158,7 +158,13 @@ if exist %WRAPPER_JAR% (
158158
@REM work with both Windows and non-Windows executions.
159159
set MAVEN_CMD_LINE_ARGS=%*
160160

161-
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
161+
%MAVEN_JAVA_EXE% ^
162+
%JVM_CONFIG_MAVEN_PROPS% ^
163+
%MAVEN_OPTS% ^
164+
%MAVEN_DEBUG_OPTS% ^
165+
-classpath %WRAPPER_JAR% ^
166+
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
167+
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
162168
if ERRORLEVEL 1 goto error
163169
goto end
164170

@@ -168,15 +174,15 @@ set ERROR_CODE=1
168174
:end
169175
@endlocal & set ERROR_CODE=%ERROR_CODE%
170176

171-
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
177+
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
172178
@REM check for post script, once with legacy .bat ending and once with .cmd ending
173-
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
174-
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
179+
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
180+
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
175181
:skipRcPost
176182

177183
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
178-
if "%MAVEN_BATCH_PAUSE%" == "on" pause
184+
if "%MAVEN_BATCH_PAUSE%"=="on" pause
179185

180-
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
186+
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
181187

182-
exit /B %ERROR_CODE%
188+
cmd /C exit /B %ERROR_CODE%

pom.xml

+11-7
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2121

2222
<!-- Web dependencies -->
23-
<webjars-bootstrap.version>5.1.3</webjars-bootstrap.version>
23+
<webjars-bootstrap.version>5.2.3</webjars-bootstrap.version>
2424
<webjars-font-awesome.version>4.7.0</webjars-font-awesome.version>
2525

26-
<jacoco.version>0.8.7</jacoco.version>
27-
<nohttp-checkstyle.version>0.0.10</nohttp-checkstyle.version>
28-
<spring-format.version>0.0.31</spring-format.version>
26+
<jacoco.version>0.8.8</jacoco.version>
27+
<nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version>
28+
<spring-format.version>0.0.38</spring-format.version>
2929

3030
</properties>
3131

@@ -132,12 +132,12 @@
132132
<plugin>
133133
<groupId>org.apache.maven.plugins</groupId>
134134
<artifactId>maven-checkstyle-plugin</artifactId>
135-
<version>3.1.2</version>
135+
<version>3.2.1</version>
136136
<dependencies>
137137
<dependency>
138138
<groupId>com.puppycrawl.tools</groupId>
139139
<artifactId>checkstyle</artifactId>
140-
<version>8.45.1</version>
140+
<version>10.8.1</version>
141141
</dependency>
142142
<dependency>
143143
<groupId>io.spring.nohttp</groupId>
@@ -163,6 +163,10 @@
163163
</execution>
164164
</executions>
165165
</plugin>
166+
<plugin>
167+
<groupId>org.graalvm.buildtools</groupId>
168+
<artifactId>native-maven-plugin</artifactId>
169+
</plugin>
166170
<plugin>
167171
<groupId>org.springframework.boot</groupId>
168172
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -296,7 +300,7 @@
296300
<plugin>
297301
<groupId>com.gitlab.haynes</groupId>
298302
<artifactId>libsass-maven-plugin</artifactId>
299-
<version>0.2.26</version>
303+
<version>0.2.29</version>
300304
<executions>
301305
<execution>
302306
<phase>generate-resources</phase>

readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ A similar setup is provided for MySQL and PostgreSQL if a persistent database co
5656
You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker:
5757

5858
```
59-
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
59+
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:8.0
6060
```
6161

6262
or
6363

6464
```
65-
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:14.1
65+
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:15.2
6666
```
6767

6868
Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt)

src/main/java/org/springframework/samples/petclinic/owner/Owner.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,14 @@ public Pet getPet(String name, boolean ignoreNew) {
145145

146146
@Override
147147
public String toString() {
148-
return new ToStringCreator(this).append("id", this.getId()).append("new", this.isNew())
149-
.append("lastName", this.getLastName()).append("firstName", this.getFirstName())
150-
.append("address", this.address).append("city", this.city).append("telephone", this.telephone)
151-
.toString();
148+
return new ToStringCreator(this).append("id", this.getId())
149+
.append("new", this.isNew())
150+
.append("lastName", this.getLastName())
151+
.append("firstName", this.getFirstName())
152+
.append("address", this.address)
153+
.append("city", this.city)
154+
.append("telephone", this.telephone)
155+
.toString();
152156
}
153157

154158
/**

src/main/resources/templates/fragments/layout.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
</div>
8888
</div>
8989

90-
<script th:src="@{/webjars/bootstrap/5.1.3/dist/js/bootstrap.bundle.min.js}"></script>
90+
<script th:src="@{/webjars/bootstrap/5.2.3/dist/js/bootstrap.bundle.min.js}"></script>
9191

9292
</body>
9393

0 commit comments

Comments
 (0)