The following document contains the results of PMD's CPD 5.2.3.
| File | Line |
|---|---|
| com\GatewayApplication.java | 123 |
| com\MockGatewayApplication.java | 105 |
}
}
@Bean
public DataSource dataSource(){
DriverManagerDataSource ds = new DriverManagerDataSource();
ds.setDriverClassName(dbDriver);
ds.setUrl(dbUrl);
ds.setUsername(dbUsername);
ds.setPassword(dbPassword);
return ds;
}
@Bean
public AuditorAware<String> auditorProvider() {
return new SpringSecurityAuditorAware();
}
@Bean
public JpaVendorAdapter jpaVendorAdapter() {
HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
adapter.setDatabase(Database.valueOf(dbType));
adapter.setShowSql(true);
adapter.setGenerateDdl(true);
adapter.setDatabasePlatform(dbDialect);
return adapter;
}
@Bean
public EntityManagerFactory entityManagerFactory() {
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
vendorAdapter.setDatabase(Database.valueOf(dbType));
vendorAdapter.setShowSql(true);
vendorAdapter.setGenerateDdl(false); //true value not for production !!! update db after entityManager instantiation based on entities
vendorAdapter.setDatabasePlatform(dbDialect);
LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
factory.setJpaVendorAdapter(vendorAdapter);
factory.setPackagesToScan("com.entity");
factory.setDataSource(dataSource());
factory.afterPropertiesSet();
return factory.getObject();
}
@Bean
public javax.validation.Validator localValidatorFactoryBean() { | |