【问题标题】:Hibernate + Resteasy Maven dependencyHibernate + Resteasy Maven 依赖
【发布时间】:2015-03-28 08:34:16
【问题描述】:

谁能告诉我在 pom.xml 中集成哪些 Hibernate 和 Resteasy 依赖项? 我将使用这两个框架创建一个 Restful Web 服务。

【问题讨论】:

  • 我需要一个 Maven 项目中 Resteasy + DAO + Hibernate 的教程:/
  • 我认为分别在谷歌上搜索 Resteasy 和 DAO/Hibernate 会更容易。因为它们没有太多的相关性。
  • 我知道,但是使用 hibernate 我在使用 hibernate 兼容性库(pom.xml 文件)时遇到了很多问题。
  • 我相信您会找到您要搜索的内容here

标签: hibernate maven dependencies resteasy


【解决方案1】:

我使用resteasy + hibernate作为api,返回一个json对象,我使用了以下依赖:

<dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>3.0.9.Final</version>
        <exclusions>
            <exclusion>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jettison</groupId>
        <artifactId>jettison</artifactId>
        <version>1.3.7</version>
    </dependency>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jettison-provider</artifactId>
        <version>3.0.9.Final</version>
        <exclusions>
            <exclusion>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
            </exclusion>
            <exclusion>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-impl</artifactId>
            </exclusion>
            <exclusion>
                <groupId>javax.xml.stream</groupId>
                <artifactId>stax-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.3.8.Final</version>
    </dependency>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-09-25
    • 2012-12-23
    • 1970-01-01
    • 1970-01-01
    • 2016-03-10
    • 2013-04-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多