@Bean
public PlatformTransactionManager transactionManager() {
JpaTransactionManager transactionManager = new JpaTransactionManager(entityManagerFactory());
transactionManager.setDataSource(datasource());
transactionManager.setJpaDialect(new HibernateJpaDialect());
return transactionManager;
}