Java Code Examples for org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean#setPersistenceProviderClass()
The following examples show how to use
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean#setPersistenceProviderClass() .
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: WebAppConfig.java From SA47 with The Unlicense | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean .setPersistenceProviderClass(HibernatePersistenceProvider.class); entityManagerFactoryBean .setPackagesToScan(env .getRequiredProperty(PROPERTY_NAME_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaProperties(hibProperties()); return entityManagerFactoryBean; }
Example 2
Source File: WebAppConfig.java From SA47 with The Unlicense | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean .setPersistenceProviderClass(HibernatePersistenceProvider.class); entityManagerFactoryBean .setPackagesToScan(env .getRequiredProperty(PROPERTY_NAME_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaProperties(hibProperties()); return entityManagerFactoryBean; }
Example 3
Source File: SpringWebConfig.java From spring-mvc-react with MIT License | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistence.class); entityManagerFactoryBean.setPackagesToScan(env.getRequiredProperty(PROP_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaProperties(getHibernateProperties()); return entityManagerFactoryBean; }
Example 4
Source File: SpringWebConfig.java From spring-mvc-react with MIT License | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistence.class); entityManagerFactoryBean.setPackagesToScan(env.getRequiredProperty(PROP_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaProperties(getHibernateProperties()); return entityManagerFactoryBean; }
Example 5
Source File: ExecutionStateRepositoryTest.java From score with Apache License 2.0 | 5 votes |
@Bean(name = "entityManagerFactory") @DependsOn({"liquibase", "dataSource"}) LocalContainerEntityManagerFactoryBean emf(JpaVendorAdapter jpaVendorAdapter) { SimpleHiloIdentifierGenerator.setDataSource(dataSource()); LocalContainerEntityManagerFactoryBean fb = new LocalContainerEntityManagerFactoryBean(); fb.setJpaProperties(hibernateProperties()); fb.setDataSource(dataSource()); fb.setPersistenceProviderClass(HibernatePersistenceProvider.class); fb.setPackagesToScan("io.cloudslang"); fb.setJpaVendorAdapter(jpaVendorAdapter); return fb; }
Example 6
Source File: PartitionTemplateWithEmfTest.java From score with Apache License 2.0 | 5 votes |
@Bean @DependsOn("liquibase") LocalContainerEntityManagerFactoryBean entityManagerFactory(JpaVendorAdapter jpaVendorAdapter) { LocalContainerEntityManagerFactoryBean fb = new LocalContainerEntityManagerFactoryBean(); fb.setDataSource(dataSource()); fb.setPersistenceProviderClass(HibernatePersistenceProvider.class); fb.setPackagesToScan("io.cloudslang.engine.partitions"); fb.setJpaVendorAdapter(jpaVendorAdapter); return fb; }
Example 7
Source File: VersionRepositoryTest.java From score with Apache License 2.0 | 5 votes |
@Bean(name = "entityManagerFactory") @DependsOn("liquibase") LocalContainerEntityManagerFactoryBean emf(JpaVendorAdapter jpaVendorAdapter) { LocalContainerEntityManagerFactoryBean fb = new LocalContainerEntityManagerFactoryBean(); fb.setJpaProperties(hibernateProperties()); fb.setDataSource(dataSource()); fb.setPersistenceProviderClass(HibernatePersistenceProvider.class); fb.setPackagesToScan("io.cloudslang.engine.versioning"); fb.setJpaVendorAdapter(jpaVendorAdapter); return fb; }
Example 8
Source File: WorkerNodeServiceTest.java From score with Apache License 2.0 | 5 votes |
@Bean(name = "entityManagerFactory") @DependsOn("liquibase") LocalContainerEntityManagerFactoryBean emf(JpaVendorAdapter jpaVendorAdapter) { LocalContainerEntityManagerFactoryBean fb = new LocalContainerEntityManagerFactoryBean(); fb.setJpaProperties(hibernateProperties()); fb.setDataSource(dataSource()); fb.setPersistenceProviderClass(HibernatePersistenceProvider.class); fb.setPackagesToScan("io.cloudslang.engine.node"); fb.setJpaVendorAdapter(jpaVendorAdapter); return fb; }
Example 9
Source File: EngineTest.java From score with Apache License 2.0 | 5 votes |
@Bean(name = "entityManagerFactory") @DependsOn("liquibase") LocalContainerEntityManagerFactoryBean emf(JpaVendorAdapter jpaVendorAdapter, Properties jpaProperties) { LocalContainerEntityManagerFactoryBean fb = new LocalContainerEntityManagerFactoryBean(); fb.setDataSource(dataSource()); fb.setJpaProperties(jpaProperties); fb.setPersistenceProviderClass(HibernatePersistenceProvider.class); fb.setPackagesToScan("io.cloudslang"); fb.setJpaVendorAdapter(jpaVendorAdapter); return fb; }
Example 10
Source File: ScoreDatabaseContext.java From score with Apache License 2.0 | 5 votes |
@Bean @DependsOn("liquibase") LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { //Init the IdentityManager SimpleHiloIdentifierGenerator.setDataSource(dataSource); //Now create the bean LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean(); emf.setDataSource(dataSource); emf.setJpaProperties(jpaProperties()); emf.setJpaVendorAdapter(jpaVendorAdapter()); emf.setPersistenceProviderClass(HibernatePersistenceProvider.class); emf.setPackagesToScan("io.cloudslang"); return emf; }
Example 11
Source File: WebConfig.java From maven-framework-project with MIT License | 5 votes |
@Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean.setPersistenceProviderClass(HibernatePersistence.class); entityManagerFactoryBean.setPackagesToScan(env.getRequiredProperty(PROPERTY_NAME_ENTITYMANAGER_PACKAGES_TO_SCAN)); entityManagerFactoryBean.setJpaProperties(hibProperties()); return entityManagerFactoryBean; }