Skip to content

Commit 348e9ef

Browse files
Merge pull request #32900 from anjumfatima90/SB4-jpa
Test Spring Boot 4 with jpa
2 parents be79b34 + 25ed0da commit 348e9ef

Some content is hidden

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

41 files changed

+2101
-5
lines changed

dev/cnf/dependabot/check_this_in_if_it_changes/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4736,6 +4736,11 @@
47364736
<artifactId>spring-data-commons</artifactId>
47374737
<version>3.3.0</version>
47384738
</dependency>
4739+
<dependency>
4740+
<groupId>org.springframework.data</groupId>
4741+
<artifactId>spring-data-commons</artifactId>
4742+
<version>4.0.0-M4</version>
4743+
</dependency>
47394744
<dependency>
47404745
<groupId>org.springframework.data</groupId>
47414746
<artifactId>spring-data-jpa</artifactId>
@@ -4746,6 +4751,11 @@
47464751
<artifactId>spring-data-jpa</artifactId>
47474752
<version>3.3.0</version>
47484753
</dependency>
4754+
<dependency>
4755+
<groupId>org.springframework.data</groupId>
4756+
<artifactId>spring-data-jpa</artifactId>
4757+
<version>4.0.0-M4</version>
4758+
</dependency>
47494759
<dependency>
47504760
<groupId>org.springframework.security</groupId>
47514761
<artifactId>spring-security-config</artifactId>
@@ -4971,6 +4981,11 @@
49714981
<artifactId>spring-orm</artifactId>
49724982
<version>6.1.14</version>
49734983
</dependency>
4984+
<dependency>
4985+
<groupId>org.springframework</groupId>
4986+
<artifactId>spring-orm</artifactId>
4987+
<version>7.0.0-M7</version>
4988+
</dependency>
49744989
<dependency>
49754990
<groupId>org.springframework</groupId>
49764991
<artifactId>spring-tx</artifactId>

dev/cnf/oss_dependencies.maven

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,10 @@ org.springframework.boot:spring-boot:4.0.0-M1
943943
org.springframework.data:spring-data-commons:2.7.6
944944
org.springframework.data:spring-data-commons:3.2.4
945945
org.springframework.data:spring-data-commons:3.3.0
946+
org.springframework.data:spring-data-commons:4.0.0-M4
946947
org.springframework.data:spring-data-jpa:2.7.6
947948
org.springframework.data:spring-data-jpa:3.3.0
949+
org.springframework.data:spring-data-jpa:4.0.0-M4
948950
org.springframework.security:spring-security-config:4.2.3.RELEASE
949951
org.springframework.security:spring-security-config:5.7.13
950952
org.springframework.security:spring-security-config:6.3.4
@@ -990,6 +992,7 @@ org.springframework:spring-jms:6.1.14
990992
org.springframework:spring-jms:7.0.0-M7
991993
org.springframework:spring-orm:5.3.39
992994
org.springframework:spring-orm:6.1.14
995+
org.springframework:spring-orm:7.0.0-M7
993996
org.springframework:spring-tx:5.3.39
994997
org.springframework:spring-tx:6.1.14
995998
org.springframework:spring-tx:7.0.0-M7
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src/main/java"/>
4+
<classpathentry kind="src" path="src/main/resources"/>
5+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/bin/
2+
/bin_test/
3+
/generated/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>io.openliberty.springboot.fat40.data.app</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compileErrorAction=build
2+
eclipse.preferences.version=1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=17
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=17
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#*******************************************************************************
2+
# Copyright (c) 2025 IBM Corporation and others.
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License 2.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
10+
#*******************************************************************************
11+
-include= \
12+
~../cnf/resources/bnd/bundle.props, \
13+
~../cnf/resources/bnd/bundle.spring.props
14+
-nouses=true
15+
16+
bVersion=1.0
17+
18+
test.project: true
19+
instrument.disabled: true
20+
publish.wlp.jar.disabled: true
21+
22+
javac.source: 17
23+
javac.target: 17
24+
25+
src: \
26+
src/main/java, \
27+
src/main/resources
28+
29+
# Specify bundles to be added to the classpath of a VM used in testing.
30+
# Entries in the -testpath instruction enable the Eclipse Package Explorer
31+
# to resolve compile dependencies for test classes. The instruction is not
32+
# required to build Spring Boot test artifacts. Each entry requies a
33+
# corresponding entry in file cnf/oss_depenendcies.maven.
34+
# Ref: https://bndtools.org/manual/packageexplorer.html
35+
36+
-testpath: \
37+
org.springframework.boot:spring-boot;${springBootVersion40}, \
38+
org.springframework.boot:spring-boot-autoconfigure;${springBootVersion40}, \
39+
\
40+
org.springframework:spring-beans;${springVersion40}, \
41+
org.springframework:spring-context;${springVersion40}, \
42+
org.springframework:spring-core;${springVersion40}, \
43+
org.springframework:spring-jdbc;${springVersion40}, \
44+
org.springframework:spring-orm;${springVersion40}, \
45+
org.springframework:spring-tx;${springVersion40}, \
46+
org.springframework:spring-web;${springVersion40}, \
47+
org.slf4j:slf4j-api;version=1.7.36, \
48+
io.openliberty.jakarta.persistence.3.2;version=latest,\
49+
io.openliberty.jakarta.servlet.6.1;version=latest, \
50+
org.springframework.data:spring-data-commons;version=latest,\
51+
org.springframework.data:spring-data-jpa;version=latest
52+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2025 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License 2.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
********************************************************************************/
11+
12+
plugins {
13+
id 'org.springframework.boot' version '4.0.0-M1'
14+
}
15+
16+
apply from: '../wlp-gradle/subprojects/spring.gradle'
17+
18+
apply plugin: 'war'
19+
apply plugin: 'io.spring.dependency-management'
20+
21+
group = 'com.ibm.ws.example.spring'
22+
version = '0.0.1-SNAPSHOT'
23+
sourceCompatibility = 17
24+
25+
apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'
26+
27+
dependencies {
28+
implementation('org.springframework.boot:spring-boot-starter-web')
29+
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
30+
implementation('org.hibernate.orm:hibernate-community-dialects:7.1.0.Final')
31+
runtimeOnly 'com.h2database:h2'
32+
// Should use spring-boot-starter-tomcat as provideCompile, but gradle plugin
33+
// is putting too much in lib-provided: see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/409
34+
// providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
35+
providedRuntime('org.apache.tomcat.embed:tomcat-embed-core')
36+
providedRuntime('org.apache.tomcat.embed:tomcat-embed-el')
37+
providedRuntime('org.apache.tomcat.embed:tomcat-embed-websocket')
38+
providedCompile 'org.hibernate.orm:hibernate-core:7.1.0.Final'
39+
providedCompile 'jakarta.transaction:jakarta.transaction-api'
40+
providedCompile 'jakarta.persistence:jakarta.persistence-api'
41+
}
42+
43+
bootJar {
44+
duplicatesStrategy 'warn'
45+
}
46+
47+
jar {
48+
enabled = false
49+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)