![]() ![]() JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter() ĮtJpaVendorAdapter(vendorAdapter) ĮntityManagerFactoryBean. getRequiredProperty(PROPERTY_NAME_HIBERNATE_HBN2DDL_SQL)) ![]() ![]() Jproperties.put("hibernate.show_sql", environment getRequiredProperty(PROPERTY_NAME_HIBERNATE_NAMING_STRATEGY)) getRequiredProperty(PROPERTY_NAME_HIBERNATE_FORMAT_SQL)) Jproperties.put("hibernate.format_sql", environment getRequiredProperty(PROPERTY_NAME_HIBERNATE_DIALECT)) Jproperties.put("hibernate.dialect", environment Properties jproperties = new Properties() Note also that one may need to tell your development environment (e.g., IntelliJ or ECLIPSE) or applications to use the correct jpl.jar, by correctly setting the CLASSPATH variable. setPersistenceProviderClass(HibernatePersistence.class) Therefore, I have written my code as such (Application.java): //notice this class Application ) I have most of my files located in package Using main Application.java file did the trick for me. Public LocalContainerEntityManagerFactoryBean. Something like this : = "entityManagerFactoryBean") First of all if you look closely at your exception trace you'll see that ContextLoaderListner is actually complaining about No bean named 'entityManagerFactory' is defined as the root cause for not being able to create personRepository.Īs I dont know what exact project structure is, You can try putting bean name with LocalContainerEntityManagerFactoryBean so that Spring can find and inject it. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |