@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
logger.debug("\n\n************ {} ************\n\n",
getDatabaseDialect().getCanonicalName());
HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
vendorAdapter.setGenerateDdl(true);
vendorAdapter.setDatabasePlatform(getDatabaseDialect().getName());
vendorAdapter.setShowSql(true);
LocalContainerEntityManagerFactoryBean factory =
new LocalContainerEntityManagerFactoryBean();
factory.setJpaVendorAdapter(vendorAdapter);
factory.setPackagesToScan(ItemEntity.class.getPackage().getName());