Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
fb0f27ce
Commit
fb0f27ce
authored
Dec 15, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EMFDependsOnPostProcessor into autoconfigure.orm.jpa
Closes gh-24452
parent
69c6b6b0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
75 additions
and
15 deletions
+75
-15
CacheAutoConfiguration.java
...work/boot/autoconfigure/cache/CacheAutoConfiguration.java
+1
-1
EntityManagerFactoryDependsOnPostProcessor.java
.../data/jpa/EntityManagerFactoryDependsOnPostProcessor.java
+8
-6
FlywayAutoConfiguration.java
...rk/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
+1
-1
HazelcastJpaDependencyAutoConfiguration.java
...re/hazelcast/HazelcastJpaDependencyAutoConfiguration.java
+2
-2
LiquibaseAutoConfiguration.java
...t/autoconfigure/liquibase/LiquibaseAutoConfiguration.java
+1
-1
EntityManagerFactoryDependsOnPostProcessor.java
...e/orm/jpa/EntityManagerFactoryDependsOnPostProcessor.java
+58
-0
HazelcastJpaDependencyAutoConfigurationTests.java
...zelcast/HazelcastJpaDependencyAutoConfigurationTests.java
+1
-1
DevToolsDataSourceAutoConfiguration.java
...ls/autoconfigure/DevToolsDataSourceAutoConfiguration.java
+1
-1
HibernateSearchElasticsearchExample.java
...cs/elasticsearch/HibernateSearchElasticsearchExample.java
+2
-2
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java
View file @
fb0f27ce
...
...
@@ -28,9 +28,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
;
import
org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cache.CacheManager
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jpa/EntityManagerFactoryDependsOnPostProcessor.java
View file @
fb0f27ce
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -20,8 +20,6 @@ import javax.persistence.EntityManagerFactory;
import
org.springframework.beans.factory.config.BeanDefinition
;
import
org.springframework.beans.factory.config.BeanFactoryPostProcessor
;
import
org.springframework.boot.autoconfigure.AbstractDependsOnBeanFactoryPostProcessor
;
import
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean
;
/**
* {@link BeanFactoryPostProcessor} that can be used to dynamically declare that all
...
...
@@ -34,8 +32,12 @@ import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
* @author Andrii Hrytsiuk
* @since 1.1.0
* @see BeanDefinition#setDependsOn(String[])
* @deprecated since 2.5.0 in favor of
* {@link org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor}
*/
public
class
EntityManagerFactoryDependsOnPostProcessor
extends
AbstractDependsOnBeanFactoryPostProcessor
{
@Deprecated
public
class
EntityManagerFactoryDependsOnPostProcessor
extends
org
.
springframework
.
boot
.
autoconfigure
.
orm
.
jpa
.
EntityManagerFactoryDependsOnPostProcessor
{
/**
* Creates a new {@code EntityManagerFactoryDependsOnPostProcessor} that will set up
...
...
@@ -43,7 +45,7 @@ public class EntityManagerFactoryDependsOnPostProcessor extends AbstractDependsO
* @param dependsOn names of the beans to depend upon
*/
public
EntityManagerFactoryDependsOnPostProcessor
(
String
...
dependsOn
)
{
super
(
EntityManagerFactory
.
class
,
AbstractEntityManagerFactoryBean
.
class
,
dependsOn
);
super
(
dependsOn
);
}
/**
...
...
@@ -53,7 +55,7 @@ public class EntityManagerFactoryDependsOnPostProcessor extends AbstractDependsO
* @since 2.1.8
*/
public
EntityManagerFactoryDependsOnPostProcessor
(
Class
<?>...
dependsOn
)
{
super
(
EntityManagerFactory
.
class
,
AbstractEntityManagerFactoryBean
.
class
,
dependsOn
);
super
(
dependsOn
);
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
View file @
fb0f27ce
...
...
@@ -43,7 +43,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayDataSourceCondition
;
import
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayEntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration.FlywayJdbcOperationsDependsOnPostProcessor
;
...
...
@@ -53,6 +52,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import
org.springframework.boot.autoconfigure.jdbc.JdbcOperationsDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.NamedParameterJdbcOperationsDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.context.properties.ConfigurationPropertiesBinding
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfiguration.java
View file @
fb0f27ce
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -24,8 +24,8 @@ import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import
org.springframework.boot.autoconfigure.condition.AllNestedConditions
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.context.annotation.Conditional
;
import
org.springframework.context.annotation.Configuration
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration.java
View file @
fb0f27ce
...
...
@@ -32,7 +32,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
;
import
org.springframework.boot.autoconfigure.jdbc.JdbcOperationsDependsOnPostProcessor
;
...
...
@@ -41,6 +40,7 @@ import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfigurati
import
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.LiquibaseEntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.LiquibaseJdbcOperationsDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration.LiquibaseNamedParameterJdbcOperationsDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryDependsOnPostProcessor.java
0 → 100644
View file @
fb0f27ce
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
orm
.
jpa
;
import
javax.persistence.EntityManagerFactory
;
import
org.springframework.beans.factory.config.BeanDefinition
;
import
org.springframework.beans.factory.config.BeanFactoryPostProcessor
;
import
org.springframework.boot.autoconfigure.AbstractDependsOnBeanFactoryPostProcessor
;
import
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean
;
/**
* {@link BeanFactoryPostProcessor} that can be used to dynamically declare that all
* {@link EntityManagerFactory} beans should "depend on" one or more specific beans.
*
* @author Marcel Overdijk
* @author Dave Syer
* @author Phillip Webb
* @author Andy Wilkinson
* @author Andrii Hrytsiuk
* @since 2.5.0
* @see BeanDefinition#setDependsOn(String[])
*/
public
class
EntityManagerFactoryDependsOnPostProcessor
extends
AbstractDependsOnBeanFactoryPostProcessor
{
/**
* Creates a new {@code EntityManagerFactoryDependsOnPostProcessor} that will set up
* dependencies upon beans with the given names.
* @param dependsOn names of the beans to depend upon
*/
public
EntityManagerFactoryDependsOnPostProcessor
(
String
...
dependsOn
)
{
super
(
EntityManagerFactory
.
class
,
AbstractEntityManagerFactoryBean
.
class
,
dependsOn
);
}
/**
* Creates a new {@code EntityManagerFactoryDependsOnPostProcessor} that will set up
* dependencies upon beans with the given types.
* @param dependsOn types of the beans to depend upon
*/
public
EntityManagerFactoryDependsOnPostProcessor
(
Class
<?>...
dependsOn
)
{
super
(
EntityManagerFactory
.
class
,
AbstractEntityManagerFactoryBean
.
class
,
dependsOn
);
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java
View file @
fb0f27ce
...
...
@@ -26,9 +26,9 @@ import org.junit.jupiter.api.Test;
import
org.springframework.beans.factory.support.BeanDefinitionRegistry
;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration.HazelcastInstanceEntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
;
import
org.springframework.boot.test.context.assertj.AssertableApplicationContext
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
...
...
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsDataSourceAutoConfiguration.java
View file @
fb0f27ce
...
...
@@ -38,9 +38,9 @@ import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.SpringBootCondition
;
import
org.springframework.boot.autoconfigure.data.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties
;
import
org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.devtools.autoconfigure.DevToolsDataSourceAutoConfiguration.DatabaseShutdownExecutorEntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.devtools.autoconfigure.DevToolsDataSourceAutoConfiguration.DevToolsDataSourceCondition
;
import
org.springframework.context.annotation.Bean
;
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/elasticsearch/HibernateSearchElasticsearchExample.java
View file @
fb0f27ce
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -18,7 +18,7 @@ package org.springframework.boot.docs.elasticsearch;
import
javax.persistence.EntityManagerFactory
;
import
org.springframework.boot.autoconfigure.
data
.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.boot.autoconfigure.
orm
.jpa.EntityManagerFactoryDependsOnPostProcessor
;
import
org.springframework.stereotype.Component
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment