类 JpaRepositoriesAutoConfiguration
java.lang.Object
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration
@AutoConfiguration(after={HibernateJpaAutoConfiguration.class,TaskExecutionAutoConfiguration.class})
@ConditionalOnBean(javax.sql.DataSource.class)
@ConditionalOnClass(org.springframework.data.jpa.repository.JpaRepository.class)
@ConditionalOnMissingBean({org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.class,org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension.class})
@ConditionalOnProperty(prefix="spring.data.jpa.repositories",
name="enabled",
havingValue="true",
matchIfMissing=true)
@Import(org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration.JpaRepositoriesImportSelector.class)
public class JpaRepositoriesAutoConfiguration
extends Object
Auto-configuration
for Spring Data's JPA Repositories.
Activates when there is a bean of type DataSource
configured in the
context, the Spring Data JPA JpaRepository
type is on the classpath, and there
is no other, existing JpaRepository
configured.
Once in effect, the auto-configuration is the equivalent of enabling JPA repositories
using the @EnableJpaRepositories
annotation.
In case EnableEnversRepositories
is on the classpath,
EnversRevisionRepositoryFactoryBean
is used instead of
JpaRepositoryFactoryBean
to support RevisionRepository
with Hibernate
Envers.
This configuration class will activate after the Hibernate auto-configuration.
- 从以下版本开始:
- 1.0.0
- 作者:
- Phillip Webb, Josh Long, Scott Frederick, Stefano Cordio
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明entityManagerFactoryBootstrapExecutorCustomizer
(Map<String, AsyncTaskExecutor> taskExecutors)
-
构造器详细资料
-
JpaRepositoriesAutoConfiguration
public JpaRepositoriesAutoConfiguration()
-
-
方法详细资料
-
entityManagerFactoryBootstrapExecutorCustomizer
@Bean @Conditional(org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration.BootstrapExecutorCondition.class) public EntityManagerFactoryBuilderCustomizer entityManagerFactoryBootstrapExecutorCustomizer(Map<String, AsyncTaskExecutor> taskExecutors)
-