2016-08-15 3 views
0

최대 절전 모드를 사용하는 데 어떤 종속성이 필요한지 궁금한가요? 나는 내 치어클래스를 찾을 수 없음 - hibernate5 LocalSessionFactoryBean

<dependencies> 
     <dependency> 
      <groupId>org.glassfish.jersey.containers</groupId> 
      <artifactId>jersey-container-servlet</artifactId> 
      <version>2.23.1</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>4.3.2.RELEASE</version> 
      <scope>compile</scope> 
     </dependency> 

     <dependency> 
      <groupId>commons-logging</groupId> 
      <artifactId>commons-logging</artifactId> 
      <version>1.1</version> 
      <exclusions> 
       <exclusion> 
        <groupId>javax.servlet</groupId> 
        <artifactId>servlet-api</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 

     <dependency> 
      <groupId>org.glassfish.jersey.ext</groupId> 
      <artifactId>jersey-spring3</artifactId> 
      <version>2.23.1</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jdbc</artifactId> 
      <version>4.3.2.RELEASE</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds --> 
     <dependency> 
      <groupId>net.sourceforge.jtds</groupId> 
      <artifactId>jtds</artifactId> 
      <version>1.3.1</version> 
     </dependency> 



     <!-- https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp --> 
     <dependency> 
      <groupId>commons-dbcp</groupId> 
      <artifactId>commons-dbcp</artifactId> 
      <version>1.4</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-core</artifactId> 
      <version>5.2.1.Final</version> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm --> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-orm</artifactId> 
      <version>4.1.6.RELEASE</version> 
     </dependency> 


     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.12</version> 
      <scope>test</scope> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin --> 
     <dependency> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 
      <version>1.2.1</version> 
     </dependency> 

    </dependencies> 

에 다음이하지만 난 예외가

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.orm.hibernate5.LocalSessionFactoryBean] for bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.orm.hibernate5.LocalSessionFactoryBean 

사람이하는 내가 놓치고 종속성으로 조언을 수 있을까

없는 수업을 받고있는 것으로 보인다?

덕분에 최대 절전 모드 5

답변

2

지원 봄-ORM의 4.2 버전에서 추가되었습니다. 최신 4.3.2-Release를 사용할 수 있습니다.

<dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-orm</artifactId> 
     <version>4.3.2.RELEASE</version> 
</dependency> 
관련 문제