Add Hibernate to STS Dynamic Web Project

2019-06-02 15:45发布

I have a Dynamic Web Project which I am developing using STS.

I want to add Hibernate to it. Is it a matter of adding the necessary jar files to the project manually, or is there some trick that I am missing that will just allow me to "Add Hibernate" ?

1条回答
Ridiculous、
2楼-- · 2019-06-02 16:23

You need to add the jars.

  • If it is no maven project then copy the jars to: webapp/WEB-INF/lib
  • If you use maven then add the hibernate dependencies to your pom

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.1.Final</version>
    </dependency>
    
查看更多
登录 后发表回答