时间:2021-07-01 10:21:17 帮助过:23人阅读
/** * As data source we use an external database * * @return */ @Bean public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(databaseDriver); dataSource.setUrl(databaseUrl); dataSource.setUsername(databaseUsername); dataSource.setPassword(databasePassword); return dataSource; } @Bean public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean lef = new LocalContainerEntityManagerFactoryBean(); lef.setPackagesToScan("com.iqmsoft.spring.batch"); lef.setDataSource(dataSource()); lef.setJpaVendorAdapter(jpaVendorAdapter()); lef.setJpaProperties(new Properties()); return lef; } @Bean public JpaVendorAdapter jpaVendorAdapter() { HibernateJpaVendorAdapter jpaVendorAdapter = new HibernateJpaVendorAdapter(); jpaVendorAdapter.setDatabase(Database.POSTGRESQL); jpaVendorAdapter.setGenerateDdl(true); jpaVendorAdapter.setShowSql(false); jpaVendorAdapter.setDatabasePlatform("org.hibernate.dialect.PostgreSQLDialect"); return jpaVendorAdapter; }
spring-boot-oracle spring-batch
标签:ble copy from boot org write password pack art ring