Skip to content

Commit 60bcd87

Browse files
authored
Merge pull request #17 from arey/feature/sync-canonical-v3
Sync with canonical including Spring Boot 3.5 upgrade
2 parents 2fd9c9e + 68439f2 commit 60bcd87

File tree

74 files changed

+1124
-570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1124
-570
lines changed

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717
wrapperVersion=3.3.2
1818
distributionType=only-script
19-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ cd spring-petclinic
4949
java -jar target/*.jar
5050
```
5151

52+
(On Windows, or if your shell doesn't expand the glob, you might need to specify the JAR file name explicitly on the command line at the end there.)
53+
5254
You can then access the Petclinic at <http://localhost:8080/>.
5355
5456
![Screenshot of the Find Owners menu](docs/find-owners-screenshot.png)
@@ -84,13 +86,13 @@ A similar setup is provided for MySQL and PostgreSQL if a persistent database co
8486
You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker:
8587
8688
```bash
87-
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.1
89+
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.2
8890
```
8991
9092
or
9193
9294
```bash
93-
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:17.0
95+
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:17.5
9496
```
9597
9698
Further documentation is provided for [MySQL](https://github.com/spring-petclinic/spring-petclinic-ai/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt)

build.gradle

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,38 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '3.4.2'
4-
id 'io.spring.dependency-management' version '1.1.6'
5-
id 'org.graalvm.buildtools.native' version '0.10.3'
6-
id 'org.cyclonedx.bom' version '1.10.0'
7-
id 'io.spring.javaformat' version '0.0.43'
3+
id 'checkstyle'
4+
id 'org.springframework.boot' version '3.5.0'
5+
id 'io.spring.dependency-management' version '1.1.7'
6+
id 'org.graalvm.buildtools.native' version '0.10.6'
7+
id 'org.cyclonedx.bom' version '2.3.1'
8+
id 'io.spring.javaformat' version '0.0.46'
89
id "io.spring.nohttp" version "0.0.11"
910
}
1011

11-
apply plugin: 'java'
12-
apply plugin: 'checkstyle'
13-
apply plugin: 'io.spring.javaformat'
14-
1512
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
1613

1714
group = 'org.springframework.samples'
18-
version = '3.4.2'
15+
version = '3.5.0'
1916

2017
java {
21-
sourceCompatibility = JavaVersion.VERSION_17
18+
toolchain {
19+
languageVersion = JavaLanguageVersion.of(17)
20+
}
2221
}
2322

2423
repositories {
2524
mavenCentral()
26-
maven { url 'https://repo.spring.io/milestone' }
2725
}
2826

29-
ext.checkstyleVersion = "10.20.1"
30-
ext.springJavaformatCheckstyleVersion = "0.0.43"
31-
ext.webjarsLocatorLiteVersion = "1.0.1"
27+
ext.checkstyleVersion = "10.25.0"
28+
ext.springJavaformatCheckstyleVersion = "0.0.46"
29+
ext.webjarsLocatorLiteVersion = "1.1.0"
3230
ext.webjarsFontawesomeVersion = "4.7.0"
33-
ext.webjarsBootstrapVersion = "5.3.3"
31+
ext.webjarsBootstrapVersion = "5.3.6"
3432
ext.webjarsMarkedVersion = "14.1.2"
3533
ext.springAiVersion = "1.0.0-M8"
3634

3735
dependencies {
38-
// Workaround for AOT issue (https://github.com/spring-projects/spring-framework/pull/33949) -->
39-
implementation 'io.projectreactor:reactor-core'
40-
4136
implementation 'org.springframework.ai:spring-ai-starter-model-openai'
4237
implementation 'org.springframework.ai:spring-ai-vector-store'
4338
implementation 'org.springframework.boot:spring-boot-starter-cache'
@@ -100,3 +95,8 @@ checkFormatAotTest.enabled = false
10095

10196
formatAot.enabled = false
10297
formatAotTest.enabled = false
98+
99+
wrapper {
100+
gradleVersion = "8.14.3"
101+
distributionType = Wrapper.DistributionType.ALL
102+
}

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
mysql:
3-
image: mysql:9.1
3+
image: mysql:9.2
44
ports:
55
- "3306:3306"
66
environment:
@@ -12,7 +12,7 @@ services:
1212
volumes:
1313
- "./conf.d:/etc/mysql/conf.d:ro"
1414
postgres:
15-
image: postgres:17.0
15+
image: postgres:17.5
1616
ports:
1717
- "5432:5432"
1818
environment:

gradle/wrapper/gradle-wrapper.jar

181 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionSha256Sum=ed1a8d686605fd7c23bdf62c7fc7add1c5b23b2bbc3721e661934ef4a4911d7c
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
45
networkTimeout=10000
56
validateDistributionUrl=true
67
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -115,7 +114,7 @@ case "$( uname )" in #(
115114
NONSTOP* ) nonstop=true ;;
116115
esac
117116

118-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
119118

120119

121120
# Determine the Java command to use to start the JVM.
@@ -206,15 +205,15 @@ fi
206205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207206

208207
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210209
# and any embedded shellness will be escaped.
211210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212211
# treated as '${Hostname}' itself on the command line.
213212

214213
set -- \
215214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
216215
-classpath "$CLASSPATH" \
217-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
218217
"$@"
219218

220219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

k8s/db.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
app: demo-db
4242
spec:
4343
containers:
44-
- image: postgres:17
44+
- image: postgres:17.5
4545
name: postgresql
4646
env:
4747
- name: POSTGRES_USER

pom.xml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.4.2</version>
8+
<version>3.5.0</version>
99
<relativePath></relativePath>
1010
</parent>
1111

1212
<groupId>org.springframework.samples</groupId>
1313
<artifactId>spring-petclinic-ai</artifactId>
14-
<version>3.4.2-SNAPSHOT</version>
14+
<version>3.5.0-SNAPSHOT</version>
1515

1616
<name>petclinic</name>
1717

@@ -21,24 +21,24 @@
2121
<java.version>17</java.version>
2222
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2323
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24-
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set
25-
-DnewVersion=... -->
24+
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set -DnewVersion=... -->
2625
<project.build.outputTimestamp>2024-11-28T14:37:52Z</project.build.outputTimestamp>
2726

2827
<!-- Web dependencies -->
29-
<webjars-locator.version>1.0.1</webjars-locator.version>
30-
<webjars-bootstrap.version>5.3.3</webjars-bootstrap.version>
28+
<webjars-locator.version>1.1.0</webjars-locator.version>
29+
<webjars-bootstrap.version>5.3.6</webjars-bootstrap.version>
3130
<webjars-font-awesome.version>4.7.0</webjars-font-awesome.version>
3231
<webjars-marked.version>14.1.2</webjars-marked.version>
3332

34-
<checkstyle.version>10.20.1</checkstyle.version>
35-
<jacoco.version>0.8.12</jacoco.version>
36-
<libsass.version>0.2.29</libsass.version>
33+
<checkstyle.version>10.25.0</checkstyle.version>
34+
<jacoco.version>0.8.13</jacoco.version>
35+
<libsass.version>0.3.4</libsass.version>
3736
<lifecycle-mapping>1.0.0</lifecycle-mapping>
3837
<maven-checkstyle.version>3.6.0</maven-checkstyle.version>
3938
<nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version>
40-
<spring-format.version>0.0.43</spring-format.version>
39+
<spring-format.version>0.0.46</spring-format.version>
4140
<spring-ai.version>1.0.0-M8</spring-ai.version>
41+
4242
</properties>
4343

4444
<dependencies>
@@ -81,11 +81,6 @@
8181
<artifactId>spring-boot-starter-test</artifactId>
8282
<scope>test</scope>
8383
</dependency>
84-
<dependency>
85-
<!-- Workaround for AOT issue (https://github.com/spring-projects/spring-framework/pull/33949) -->
86-
<groupId>io.projectreactor</groupId>
87-
<artifactId>reactor-core</artifactId>
88-
</dependency>
8984

9085
<!-- Databases - Uses H2 by default -->
9186
<dependency>
@@ -195,9 +190,7 @@
195190
<configuration>
196191
<rules>
197192
<requireJavaVersion>
198-
<message>This build requires at least Java ${java.version},
199-
update your JVM, and
200-
run the build again</message>
193+
<message>This build requires at least Java ${java.version}, update your JVM, and run the build again</message>
201194
<version>${java.version}</version>
202195
</requireJavaVersion>
203196
</rules>

0 commit comments

Comments
 (0)