Skip to content

Commit 25babdf

Browse files
committed
EntityManager uses jakarta package not javax
1 parent 7cd9863 commit 25babdf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-cloud-task-core/src/main/java/org/springframework/cloud/task/configuration/DefaultTaskConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public PlatformTransactionManager getTransactionManager() {
141141
if (this.transactionManager == null) {
142142
if (isDataSourceAvailable()) {
143143
try {
144-
Class.forName("javax.persistence.EntityManager");
144+
Class.forName("jakarta.persistence.EntityManager");
145145
if (this.context != null && this.context.getBeanNamesForType(EntityManager.class).length > 0) {
146146
logger.debug("EntityManager was found, using JpaTransactionManager");
147147
this.transactionManager = new JpaTransactionManager();

spring-cloud-task-core/src/test/java/org/springframework/cloud/task/configuration/DefaultTaskConfigurerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void testDefaultContext() throws Exception {
6666
DefaultTaskConfigurer defaultTaskConfigurer = new DefaultTaskConfigurer(this.dataSource,
6767
TaskProperties.DEFAULT_TABLE_PREFIX, localContext);
6868
assertThat(defaultTaskConfigurer.getTransactionManager().getClass().getName())
69-
.isEqualTo("org.springframework.jdbc.support.JdbcTransactionManager");
69+
.isEqualTo("org.springframework.orm.jpa.JpaTransactionManager");
7070
}
7171

7272
@Test

0 commit comments

Comments
 (0)