org.springframework.boot.autoconfigure.orm.jpa.JpaProperties Java Examples
The following examples show how to use
org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
/** * {@link JpaDeploymentManagement} bean. * * @return a new {@link DeploymentManagement} */ @Bean @ConditionalOnMissingBean DeploymentManagement deploymentManagement(final EntityManager entityManager, final ActionRepository actionRepository, final DistributionSetRepository distributionSetRepository, final TargetRepository targetRepository, final ActionStatusRepository actionStatusRepository, final AuditorAware<String> auditorProvider, final EventPublisherHolder eventPublisherHolder, final AfterTransactionCommitExecutor afterCommit, final VirtualPropertyReplacer virtualPropertyReplacer, final PlatformTransactionManager txManager, final TenantConfigurationManagement tenantConfigurationManagement, final QuotaManagement quotaManagement, final SystemSecurityContext systemSecurityContext, final TenantAware tenantAware, final JpaProperties properties, final RepositoryProperties repositoryProperties) { return new JpaDeploymentManagement(entityManager, actionRepository, distributionSetRepository, targetRepository, actionStatusRepository, auditorProvider, eventPublisherHolder, afterCommit, virtualPropertyReplacer, txManager, tenantConfigurationManagement, quotaManagement, systemSecurityContext, tenantAware, properties.getDatabase(), repositoryProperties); }
Example #2
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
/** * {@link JpaTenantConfigurationManagement} bean. * * @return a new {@link TenantConfigurationManagement} */ @Bean @ConditionalOnMissingBean TargetManagement targetManagement(final EntityManager entityManager, final QuotaManagement quotaManagement, final TargetRepository targetRepository, final TargetMetadataRepository targetMetadataRepository, final RolloutGroupRepository rolloutGroupRepository, final DistributionSetRepository distributionSetRepository, final TargetFilterQueryRepository targetFilterQueryRepository, final TargetTagRepository targetTagRepository, final NoCountPagingRepository criteriaNoCountDao, final EventPublisherHolder eventPublisherHolder, final TenantAware tenantAware, final AfterTransactionCommitExecutor afterCommit, final VirtualPropertyReplacer virtualPropertyReplacer, final JpaProperties properties) { return new JpaTargetManagement(entityManager, quotaManagement, targetRepository, targetMetadataRepository, rolloutGroupRepository, distributionSetRepository, targetFilterQueryRepository, targetTagRepository, criteriaNoCountDao, eventPublisherHolder, tenantAware, afterCommit, virtualPropertyReplacer, properties.getDatabase()); }
Example #3
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
/** * {@link JpaDistributionSetManagement} bean. * * @return a new {@link DistributionSetManagement} */ @Bean @ConditionalOnMissingBean DistributionSetManagement distributionSetManagement(final EntityManager entityManager, final DistributionSetRepository distributionSetRepository, final DistributionSetTagManagement distributionSetTagManagement, final SystemManagement systemManagement, final DistributionSetTypeManagement distributionSetTypeManagement, final QuotaManagement quotaManagement, final DistributionSetMetadataRepository distributionSetMetadataRepository, final TargetFilterQueryRepository targetFilterQueryRepository, final ActionRepository actionRepository, final NoCountPagingRepository criteriaNoCountDao, final EventPublisherHolder eventPublisherHolder, final TenantAware tenantAware, final VirtualPropertyReplacer virtualPropertyReplacer, final SoftwareModuleRepository softwareModuleRepository, final DistributionSetTagRepository distributionSetTagRepository, final AfterTransactionCommitExecutor afterCommit, final JpaProperties properties) { return new JpaDistributionSetManagement(entityManager, distributionSetRepository, distributionSetTagManagement, systemManagement, distributionSetTypeManagement, quotaManagement, distributionSetMetadataRepository, targetFilterQueryRepository, actionRepository, criteriaNoCountDao, eventPublisherHolder, tenantAware, virtualPropertyReplacer, softwareModuleRepository, distributionSetTagRepository, afterCommit, properties.getDatabase()); }
Example #4
Source File: Application.java From spring-boot-multi-tenancy with MIT License | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder factory, DataSource dataSource, JpaProperties properties) { HibernateSettings settings = new HibernateSettings(); settings.ddlAuto("create-drop"); Map<String, Object> jpaProperties = new HashMap<>(properties.getHibernateProperties(settings)); jpaProperties.put("hibernate.ejb.interceptor", hibernateInterceptor()); return factory.dataSource(dataSource).packages("com.example").properties(jpaProperties).build(); }
Example #5
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaRolloutGroupManagement} bean. * * @return a new {@link RolloutGroupManagement} */ @Bean @ConditionalOnMissingBean RolloutGroupManagement rolloutGroupManagement(final RolloutGroupRepository rolloutGroupRepository, final RolloutRepository rolloutRepository, final ActionRepository actionRepository, final TargetRepository targetRepository, final EntityManager entityManager, final VirtualPropertyReplacer virtualPropertyReplacer, final RolloutStatusCache rolloutStatusCache, final JpaProperties properties) { return new JpaRolloutGroupManagement(rolloutGroupRepository, rolloutRepository, actionRepository, targetRepository, entityManager, virtualPropertyReplacer, rolloutStatusCache, properties.getDatabase()); }
Example #6
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
@Bean @ConditionalOnMissingBean RolloutManagement rolloutManagement(final TargetManagement targetManagement, final DeploymentManagement deploymentManagement, final RolloutGroupManagement rolloutGroupManagement, final DistributionSetManagement distributionSetManagement, final ApplicationContext context, final EventPublisherHolder eventPublisherHolder, final VirtualPropertyReplacer virtualPropertyReplacer, final PlatformTransactionManager txManager, final TenantAware tenantAware, final LockRegistry lockRegistry, final JpaProperties properties, final RolloutApprovalStrategy rolloutApprovalStrategy, final TenantConfigurationManagement tenantConfigurationManagement, final SystemSecurityContext systemSecurityContext) { return new JpaRolloutManagement(targetManagement, deploymentManagement, rolloutGroupManagement, distributionSetManagement, context, eventPublisherHolder, virtualPropertyReplacer, txManager, tenantAware, lockRegistry, properties.getDatabase(), rolloutApprovalStrategy, tenantConfigurationManagement, systemSecurityContext); }
Example #7
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaSoftwareModuleTypeManagement} bean. * * @return a new {@link SoftwareModuleTypeManagement} */ @Bean @ConditionalOnMissingBean SoftwareModuleTypeManagement softwareModuleTypeManagement( final DistributionSetTypeRepository distributionSetTypeRepository, final SoftwareModuleTypeRepository softwareModuleTypeRepository, final VirtualPropertyReplacer virtualPropertyReplacer, final SoftwareModuleRepository softwareModuleRepository, final NoCountPagingRepository criteriaNoCountDao, final JpaProperties properties) { return new JpaSoftwareModuleTypeManagement(distributionSetTypeRepository, softwareModuleTypeRepository, virtualPropertyReplacer, softwareModuleRepository, criteriaNoCountDao, properties.getDatabase()); }
Example #8
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaSoftwareModuleManagement} bean. * * @return a new {@link SoftwareModuleManagement} */ @Bean @ConditionalOnMissingBean SoftwareModuleManagement softwareModuleManagement(final EntityManager entityManager, final DistributionSetRepository distributionSetRepository, final SoftwareModuleRepository softwareModuleRepository, final SoftwareModuleMetadataRepository softwareModuleMetadataRepository, final SoftwareModuleTypeRepository softwareModuleTypeRepository, final NoCountPagingRepository criteriaNoCountDao, final AuditorAware<String> auditorProvider, final ArtifactManagement artifactManagement, final QuotaManagement quotaManagement, final VirtualPropertyReplacer virtualPropertyReplacer, final JpaProperties properties) { return new JpaSoftwareModuleManagement(entityManager, distributionSetRepository, softwareModuleRepository, softwareModuleMetadataRepository, softwareModuleTypeRepository, criteriaNoCountDao, auditorProvider, artifactManagement, quotaManagement, virtualPropertyReplacer, properties.getDatabase()); }
Example #9
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaDistributionSetTagManagement} bean. * * @return a new {@link JpaDistributionSetTagManagement} */ @Bean @ConditionalOnMissingBean DistributionSetTagManagement distributionSetTagManagement( final DistributionSetTagRepository distributionSetTagRepository, final DistributionSetRepository distributionSetRepository, final VirtualPropertyReplacer virtualPropertyReplacer, final NoCountPagingRepository criteriaNoCountDao, final JpaProperties properties) { return new JpaDistributionSetTagManagement(distributionSetTagRepository, distributionSetRepository, virtualPropertyReplacer, criteriaNoCountDao, properties.getDatabase()); }
Example #10
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaTargetTagManagement} bean. * * @return a new {@link TargetTagManagement} */ @Bean @ConditionalOnMissingBean TargetTagManagement targetTagManagement(final TargetTagRepository targetTagRepository, final TargetRepository targetRepository, final VirtualPropertyReplacer virtualPropertyReplacer, final JpaProperties properties) { return new JpaTargetTagManagement(targetTagRepository, targetRepository, virtualPropertyReplacer, properties.getDatabase()); }
Example #11
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
/** * {@link JpaDistributionSetManagement} bean. * * @return a new {@link DistributionSetManagement} */ @Bean @ConditionalOnMissingBean DistributionSetTypeManagement distributionSetTypeManagement( final DistributionSetTypeRepository distributionSetTypeRepository, final SoftwareModuleTypeRepository softwareModuleTypeRepository, final DistributionSetRepository distributionSetRepository, final VirtualPropertyReplacer virtualPropertyReplacer, final NoCountPagingRepository criteriaNoCountDao, final JpaProperties properties, final QuotaManagement quotaManagement) { return new JpaDistributionSetTypeManagement(distributionSetTypeRepository, softwareModuleTypeRepository, distributionSetRepository, virtualPropertyReplacer, criteriaNoCountDao, properties.getDatabase(), quotaManagement); }
Example #12
Source File: PrimaryJpaConfig.java From spring-boot-demo with MIT License | 5 votes |
/** * 获取主库实体管理工厂对象 * * @param primaryDataSource 注入名为primaryDataSource的数据源 * @param jpaProperties 注入名为primaryJpaProperties的jpa配置信息 * @param builder 注入EntityManagerFactoryBuilder * @return 实体管理工厂对象 */ @Primary @Bean(name = "primaryEntityManagerFactory") public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("primaryDataSource") DataSource primaryDataSource, @Qualifier("primaryJpaProperties") JpaProperties jpaProperties, EntityManagerFactoryBuilder builder) { return builder // 设置数据源 .dataSource(primaryDataSource) // 设置jpa配置 .properties(jpaProperties.getProperties()) // 设置实体包名 .packages(ENTITY_PACKAGE) // 设置持久化单元名,用于@PersistenceContext注解获取EntityManager时指定数据源 .persistenceUnit("primaryPersistenceUnit").build(); }
Example #13
Source File: PrimaryJpaConfig.java From spring-boot-demo with MIT License | 5 votes |
/** * 扫描spring.jpa.primary开头的配置信息 * * @return jpa配置信息 */ @Primary @Bean(name = "primaryJpaProperties") @ConfigurationProperties(prefix = "spring.jpa.primary") public JpaProperties jpaProperties() { return new JpaProperties(); }
Example #14
Source File: SecondJpaConfig.java From spring-boot-demo with MIT License | 5 votes |
/** * 获取主库实体管理工厂对象 * * @param secondDataSource 注入名为secondDataSource的数据源 * @param jpaProperties 注入名为secondJpaProperties的jpa配置信息 * @param builder 注入EntityManagerFactoryBuilder * @return 实体管理工厂对象 */ @Bean(name = "secondEntityManagerFactory") public LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("secondDataSource") DataSource secondDataSource, @Qualifier("secondJpaProperties") JpaProperties jpaProperties, EntityManagerFactoryBuilder builder) { return builder // 设置数据源 .dataSource(secondDataSource) // 设置jpa配置 .properties(jpaProperties.getProperties()) // 设置实体包名 .packages(ENTITY_PACKAGE) // 设置持久化单元名,用于@PersistenceContext注解获取EntityManager时指定数据源 .persistenceUnit("secondPersistenceUnit").build(); }
Example #15
Source File: EclipseLinkJpaConfigForTest.java From griffin with Apache License 2.0 | 5 votes |
protected EclipseLinkJpaConfigForTest( DataSource ds, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtm, ObjectProvider<TransactionManagerCustomizers> tmc) { super(ds, properties, jtm, tmc); }
Example #16
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
protected RepositoryApplicationConfiguration(final DataSource dataSource, final JpaProperties properties, final ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider, final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers); }
Example #17
Source File: SecondJpaConfig.java From spring-boot-demo with MIT License | 4 votes |
/** * 扫描spring.jpa.second开头的配置信息 * * @return jpa配置信息 */ @Bean(name = "secondJpaProperties") @ConfigurationProperties(prefix = "spring.jpa.second") public JpaProperties jpaProperties() { return new JpaProperties(); }
Example #18
Source File: Application.java From cloud-s4-sdk-examples with Apache License 2.0 | 4 votes |
protected Application(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers); }
Example #19
Source File: EclipseLinkJpaConfiguration.java From servicecomb-pack with Apache License 2.0 | 4 votes |
EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers); }
Example #20
Source File: EclipseLinkJpaConfig.java From griffin with Apache License 2.0 | 4 votes |
protected EclipseLinkJpaConfig( DataSource ds, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtm, ObjectProvider<TransactionManagerCustomizers> tmc) { super(ds, properties, jtm, tmc); }
Example #21
Source File: EclipseLinkJpaConfiguration.java From servicecomb-saga-actuator with Apache License 2.0 | 4 votes |
EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers); }
Example #22
Source File: EspmJpaConfig.java From cloud-espm-cloud-native with Apache License 2.0 | 4 votes |
protected EspmJpaConfig(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager) { super(dataSource, properties, jtaTransactionManager); }
Example #23
Source File: EclipseLinkJpaConfiguration.java From txle with Apache License 2.0 | 4 votes |
EclipseLinkJpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers); }
Example #24
Source File: JpaConfiguration.java From metron with Apache License 2.0 | 4 votes |
protected JpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers); }
Example #25
Source File: JpaConfiguration.java From tutorials with MIT License | 4 votes |
protected JpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) { super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers); }
Example #26
Source File: RepositoryApplicationConfiguration.java From hawkbit with Eclipse Public License 1.0 | 3 votes |
/** * {@link JpaTargetFilterQueryManagement} bean. * * @param targetFilterQueryRepository * holding {@link TargetFilterQuery} entities * @param targetRepository * holding {@link Target} entities * @param virtualPropertyReplacer * for RSQL handling * @param distributionSetManagement * for auto assign DS access * @param quotaManagement * to access quotas * @param properties * JPA properties * * @return a new {@link TargetFilterQueryManagement} */ @Bean @ConditionalOnMissingBean TargetFilterQueryManagement targetFilterQueryManagement( final TargetFilterQueryRepository targetFilterQueryRepository, final TargetRepository targetRepository, final VirtualPropertyReplacer virtualPropertyReplacer, final DistributionSetManagement distributionSetManagement, final QuotaManagement quotaManagement, final JpaProperties properties, final TenantConfigurationManagement tenantConfigurationManagement, final SystemSecurityContext systemSecurityContext) { return new JpaTargetFilterQueryManagement(targetFilterQueryRepository, targetRepository, virtualPropertyReplacer, distributionSetManagement, quotaManagement, properties.getDatabase(), tenantConfigurationManagement, systemSecurityContext); }