添加Hibernate到STS动态Web项目 [英] Add Hibernate to STS Dynamic Web Project

查看:169
本文介绍了添加Hibernate到STS动态Web项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用STS开发的动态Web项目。

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

我想向它添加Hibernate。是否需要手动添加必要的jar文件到项目中,或者是否存在一些让我添加Hibernate的技巧?

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" ?

推荐答案

您需要添加罐子。


  • 如果不是maven项目, : webapp / WEB-INF / lib

  • 如果您使用maven,那么将hibernate依赖关系添加到您的pom

  • 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>


这篇关于添加Hibernate到STS动态Web项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆