Skip to content

Instantly share code, notes, and snippets.

@jamestrandung
Last active April 3, 2020 03:32
Show Gist options
  • Save jamestrandung/3cb41a78264a97959b7f26be34dafa7b to your computer and use it in GitHub Desktop.
Save jamestrandung/3cb41a78264a97959b7f26be34dafa7b to your computer and use it in GitHub Desktop.
Set up LocalContainerEntityManagerFactoryBean
@Primary
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) {
LocalContainerEntityManagerFactoryBean emfBean = new LocalContainerEntityManagerFactoryBean();
emfBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
emfBean.setDataSource(dataSource);
// Other configurations
}
@lexblay
Copy link

lexblay commented Apr 3, 2020

Where is this code, I have a problem when I add spring data JPA in pom.xml in WebSphere 8.5, without JPA it works correctly as in your tutorial, if you could share a demo project I would really appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment