diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java index 0c64dbe30f..e5e2e93b90 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java @@ -116,6 +116,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware { @Bean @ConditionalOnMissingBean + @SuppressWarnings("deprecation") public EntityManagerFactoryBuilder entityManagerFactoryBuilder( JpaVendorAdapter jpaVendorAdapter, ObjectProvider persistenceUnitManager) { @@ -151,6 +152,7 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware { protected void customizeVendorProperties(Map vendorProperties) { } + @Deprecated protected EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback getVendorCallback() { return null; } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java index e4fbf821ec..2d79e5d8b7 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java @@ -98,6 +98,7 @@ public class EntityManagerFactoryBuilder { * An optional callback for new entity manager factory beans. * @param callback the entity manager factory bean callback */ + @Deprecated public void setCallback(EntityManagerFactoryBeanCallback callback) { this.callback = callback; } @@ -200,6 +201,7 @@ public class EntityManagerFactoryBuilder { return this; } + @SuppressWarnings("deprecation") public LocalContainerEntityManagerFactoryBean build() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); if (EntityManagerFactoryBuilder.this.persistenceUnitManager != null) { @@ -243,6 +245,7 @@ public class EntityManagerFactoryBuilder { * A callback for new entity manager factory beans created by a Builder. */ @FunctionalInterface + @Deprecated public interface EntityManagerFactoryBeanCallback { void execute(LocalContainerEntityManagerFactoryBean factory);