java 哪些 Jackson maven 依赖项包含在用于 JAXB JSON 编组的 spring 3.1 项目中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11629023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which Hymanson maven dependencies to include in spring 3.1 project for JAXB JSON marshalling?
提问by Jér?me Verstrynge
In the code sample available here, one imports the following for JSON JAXB marshalling:
在此处提供的代码示例中,为 JSON JAXB 编组导入了以下内容:
<dependency>
<groupId>org.codehaus.Hymanson</groupId>
<artifactId>Hymanson-mapper-asl</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
Yet, thisblog post, referring to thisblog post, suggests:
<!-- Hymanson -->
<dependency>
<groupId>org.codehaus.Hymanson</groupId>
<artifactId>Hymanson-core-lgpl</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.Hymanson</groupId>
<artifactId>Hymanson-mapper-lgpl</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.Hymanson</groupId>
<artifactId>Hymanson-xc</artifactId>
<version>1.3.0</version>
</dependency>
where 'Hymanson-xc provides the additional Jaxb support'.
其中“Hymanson-xc 提供了额外的 Jaxb 支持”。
What is the difference between both set of maven dependencies when it comes to JAXB JSON marhsalling in Spring? Which one should be used preferably?
就 Spring 中的 JAXB JSON 编组而言,这两组 Maven 依赖项之间有什么区别?应该优先使用哪一种?
回答by Tomer
回答by Lakshmi Deepak
Use this dependency in your pom.xml file.
在 pom.xml 文件中使用此依赖项。
<dependency>
<groupId>org.codehaus.Hymanson</groupId>
<artifactId>Hymanson-mapper-asl</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.Hymanson.core</groupId>
<artifactId>Hymanson-databind</artifactId>
<version>2.5.0</version>
</dependency>