Skip to content

Commit e03f015

Browse files
committed
Deprecate EntityManagerFactoryBeanCallback
Closes gh-14083
1 parent e034b38 commit e03f015

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public JpaVendorAdapter jpaVendorAdapter() {
116116

117117
@Bean
118118
@ConditionalOnMissingBean
119+
@SuppressWarnings("deprecation")
119120
public EntityManagerFactoryBuilder entityManagerFactoryBuilder(
120121
JpaVendorAdapter jpaVendorAdapter,
121122
ObjectProvider<PersistenceUnitManager> persistenceUnitManager) {
@@ -151,6 +152,7 @@ public LocalContainerEntityManagerFactoryBean entityManagerFactory(
151152
protected void customizeVendorProperties(Map<String, Object> vendorProperties) {
152153
}
153154

155+
@Deprecated
154156
protected EntityManagerFactoryBuilder.EntityManagerFactoryBeanCallback getVendorCallback() {
155157
return null;
156158
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/orm/jpa/EntityManagerFactoryBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public Builder dataSource(DataSource dataSource) {
9898
* An optional callback for new entity manager factory beans.
9999
* @param callback the entity manager factory bean callback
100100
*/
101+
@Deprecated
101102
public void setCallback(EntityManagerFactoryBeanCallback callback) {
102103
this.callback = callback;
103104
}
@@ -200,6 +201,7 @@ public Builder jta(boolean jta) {
200201
return this;
201202
}
202203

204+
@SuppressWarnings("deprecation")
203205
public LocalContainerEntityManagerFactoryBean build() {
204206
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
205207
if (EntityManagerFactoryBuilder.this.persistenceUnitManager != null) {
@@ -243,6 +245,7 @@ public LocalContainerEntityManagerFactoryBean build() {
243245
* A callback for new entity manager factory beans created by a Builder.
244246
*/
245247
@FunctionalInterface
248+
@Deprecated
246249
public interface EntityManagerFactoryBeanCallback {
247250

248251
void execute(LocalContainerEntityManagerFactoryBean factory);

0 commit comments

Comments
 (0)