@Bean
 public JpaVendorAdapter jpaVendorAdapter() {
   HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
   hibernateJpaVendorAdapter.setGenerateDdl(true);
   hibernateJpaVendorAdapter.setDatabase(Database.MYSQL);
   hibernateJpaVendorAdapter.setShowSql(showsql);
   return hibernateJpaVendorAdapter;
 }
 private HibernateJpaVendorAdapter hibernateJpaVendorAdapter() {
   HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
   hibernateJpaVendorAdapter.setDatabase(Database.POSTGRESQL);
   hibernateJpaVendorAdapter.setShowSql(true);
   hibernateJpaVendorAdapter.setGenerateDdl(true);
   hibernateJpaVendorAdapter.setDatabasePlatform("org.hibernate.dialect.PostgreSQL9Dialect");
   return hibernateJpaVendorAdapter;
 }
  @Bean
  public JpaVendorAdapter jpaVendorAdapter() {
    HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
    adapter.setDatabase(Database.MYSQL);
    adapter.setGenerateDdl(true);

    return adapter;
  }
Exemple #4
0
  @Bean
  public HibernateJpaVendorAdapter jpaVendorAdapter() {
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabase(Database.MYSQL);
    vendorAdapter.setShowSql(true);

    return vendorAdapter;
  }
 @Bean
 public JpaVendorAdapter jpaVendorAdapter() {
   HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter();
   adapter.setDatabase(Database.valueOf(env.getProperty("spring.database.vendor")));
   //		adapter.setDatabase(Database.H2);
   //		adapter.setShowSql(true);
   //		adapter.setGenerateDdl(false);
   //		adapter.setDatabasePlatform("org.hibernate.dialect.H2Dialect");
   return adapter;
 }
  @Bean
  public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
    HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
    vendorAdapter.setDatabase(Database.MYSQL);
    vendorAdapter.setGenerateDdl(true);

    LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
    factory.setJpaVendorAdapter(vendorAdapter);
    factory.setPackagesToScan(getClass().getPackage().getName());
    factory.setDataSource(dataSource());
    return factory;
  }
 @Bean
 LocalContainerEntityManagerFactoryBean entityManagerFactory() {
   LocalContainerEntityManagerFactoryBean factoryBean =
       new LocalContainerEntityManagerFactoryBean();
   HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
   vendorAdapter.setDatabase(Database.MYSQL);
   vendorAdapter.setGenerateDdl(true);
   vendorAdapter.setShowSql(false);
   factoryBean.setPackagesToScan("com.magic.app.**.entities");
   factoryBean.setJpaVendorAdapter(vendorAdapter);
   factoryBean.setDataSource(dataSource());
   return factoryBean;
 }
 /**
  * Configures the hibernate JPA Vendor adapter.
  *
  * <p>The database type is set to <code>Database.POSTGRESQL</code>.
  *
  * @return HibernateJpaVendorAdapter
  * @see HibernateJpaVendorAdapter
  * @see Database
  */
 @Bean
 public HibernateJpaVendorAdapter jpaVendorAdapter() {
   HibernateJpaVendorAdapter jva = new HibernateJpaVendorAdapter();
   jva.setDatabase(Database.POSTGRESQL);
   return jva;
 }