Last active
April 3, 2020 03:32
-
-
Save jamestrandung/3cb41a78264a97959b7f26be34dafa7b to your computer and use it in GitHub Desktop.
Set up LocalContainerEntityManagerFactoryBean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Primary | |
@Bean | |
public LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource) { | |
LocalContainerEntityManagerFactoryBean emfBean = new LocalContainerEntityManagerFactoryBean(); | |
emfBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); | |
emfBean.setDataSource(dataSource); | |
// Other configurations | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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