Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What maven dependency need to have Class LocalContainerEntityManagerFactoryBean?

Tags:

java

spring

maven

In my project class LocalContainerEntityManagerFactoryBean not found. I don't understand why? In other simple project with this class all works fine.

<bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="persistenceUnitName" value="simpleTest" />
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter">
    <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
        <property name="showSql" value="true" />
        <property name="generateDdl" value="true" />
        <property name="databasePlatform" value="org.hibernate.dialect.H2Dialect" />
    </bean>
    </property>
</bean>
like image 821
Igor Kostenko Avatar asked Dec 28 '22 05:12

Igor Kostenko


1 Answers

I use http://www.jarvana.com to look up maven dependencies.

I guess that you need spring-orm:

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-orm</artifactId>
   <version>3.1.0.RELEASE</version>
</dependency>
like image 122
bugs_ Avatar answered Dec 29 '22 19:12

bugs_