Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sesemomo
spring-framework
提交
341385ac
S
spring-framework
项目概览
sesemomo
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
341385ac
编写于
6月 19, 2019
作者:
S
Sebastien Deleuze
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '5.1.x'
上级
73c2eb1b
bcad276a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
8 addition
and
8 deletion
+8
-8
spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java
...springframework/http/codec/json/Jackson2CodecSupport.java
+1
-1
spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
...p/converter/json/MappingJackson2HttpMessageConverter.java
+1
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java
...mework/web/servlet/view/json/MappingJackson2JsonView.java
+1
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java
...ramework/web/servlet/view/xml/MappingJackson2XmlView.java
+1
-1
src/docs/asciidoc/integration.adoc
src/docs/asciidoc/integration.adoc
+1
-1
src/docs/asciidoc/web/webflux-functional.adoc
src/docs/asciidoc/web/webflux-functional.adoc
+1
-1
src/docs/asciidoc/web/webflux.adoc
src/docs/asciidoc/web/webflux.adoc
+1
-1
src/docs/asciidoc/web/webmvc.adoc
src/docs/asciidoc/web/webmvc.adoc
+1
-1
未找到文件。
spring-web/src/main/java/org/springframework/http/codec/json/Jackson2CodecSupport.java
浏览文件 @
341385ac
...
...
@@ -51,7 +51,7 @@ public abstract class Jackson2CodecSupport {
/**
* The key for the hint to specify a "JSON View" for encoding or decoding
* with the value expected to be a {@link Class}.
* @see <a href="https://w
iki.fasterxml.com/JacksonJsonViews
">Jackson JSON Views</a>
* @see <a href="https://w
ww.baeldung.com/jackson-json-view-annotation
">Jackson JSON Views</a>
*/
public
static
final
String
JSON_VIEW_HINT
=
Jackson2CodecSupport
.
class
.
getName
()
+
".jsonView"
;
...
...
spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
浏览文件 @
341385ac
...
...
@@ -26,7 +26,7 @@ import org.springframework.lang.Nullable;
/**
* Implementation of {@link org.springframework.http.converter.HttpMessageConverter} that can read and
* write JSON using <a href="https://
wiki.fasterxml.com/JacksonHome
">Jackson 2.x's</a> {@link ObjectMapper}.
* write JSON using <a href="https://
github.com/FasterXML/jackson
">Jackson 2.x's</a> {@link ObjectMapper}.
*
* <p>This converter can be used to bind to typed beans, or untyped {@code HashMap} instances.
*
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java
浏览文件 @
341385ac
...
...
@@ -35,7 +35,7 @@ import org.springframework.web.servlet.View;
/**
* Spring MVC {@link View} that renders JSON content by serializing the model for the current request
* using <a href="https://
wiki.fasterxml.com/JacksonHome
">Jackson 2's</a> {@link ObjectMapper}.
* using <a href="https://
github.com/FasterXML/jackson
">Jackson 2's</a> {@link ObjectMapper}.
*
* <p>By default, the entire contents of the model map (with the exception of framework-specific classes)
* will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java
浏览文件 @
341385ac
...
...
@@ -30,7 +30,7 @@ import org.springframework.web.servlet.view.json.AbstractJackson2View;
/**
* Spring MVC {@link View} that renders XML content by serializing the model for the current request
* using <a href="https://
wiki.fasterxml.com/JacksonHome
">Jackson 2's</a> {@link XmlMapper}.
* using <a href="https://
github.com/FasterXML/jackson
">Jackson 2's</a> {@link XmlMapper}.
*
* <p>The Object to be serialized is supplied as a parameter in the model. The first serializable
* entry is used. Users can either specify a specific entry in the model via the
...
...
src/docs/asciidoc/integration.adoc
浏览文件 @
341385ac
...
...
@@ -1190,7 +1190,7 @@ and writes the media type supported by the Java I/O API.
[[rest-template-jsonview]]
===== Jackson JSON Views
You can specify a https://w
iki.fasterxml.com/JacksonJsonViews
[Jackson JSON View]
You can specify a https://w
ww.baeldung.com/jackson-json-view-annotation
[Jackson JSON View]
to serialize only a subset of the object properties, as the following example shows:
[source,java,indent=0]
...
...
src/docs/asciidoc/web/webflux-functional.adoc
浏览文件 @
341385ac
...
...
@@ -165,7 +165,7 @@ ServerResponse.created(location).build();
----
Depending on the codec used, it is possible to pass hint parameters to customize how the
body is serialized or deserialized. For example, to specify a https://w
iki.fasterxml.com/JacksonJsonViews
[Jackson JSON view]:
body is serialized or deserialized. For example, to specify a https://w
ww.baeldung.com/jackson-json-view-annotation
[Jackson JSON view]:
====
[source,java]
...
...
src/docs/asciidoc/web/webflux.adoc
浏览文件 @
341385ac
...
...
@@ -2364,7 +2364,7 @@ Spring offers support for the Jackson JSON library.
[.small]#<<web.adoc#mvc-ann-jackson, Same as in Spring MVC>>#
Spring WebFlux provides built-in support for
https://w
iki.fasterxml.com/JacksonJsonViews
[Jackson's Serialization Views],
https://w
ww.baeldung.com/jackson-json-view-annotation
[Jackson's Serialization Views],
which allows rendering only a subset of all fields in an `Object`. To use it with
`@ResponseBody` or `ResponseEntity` controller methods, you can use Jackson's
`@JsonView` annotation to activate a serialization view class, as the following example shows:
...
...
src/docs/asciidoc/web/webmvc.adoc
浏览文件 @
341385ac
...
...
@@ -2672,7 +2672,7 @@ Spring offers support for the Jackson JSON library.
[.small]#
<
<
web-reactive.adoc#webflux-ann-jsonview
,
Same
as
in
Spring
WebFlux
>
>#
Spring MVC provides built-in support for
https://w
iki.fasterxml.com/JacksonJsonViews
[Jackson's Serialization Views],
https://w
ww.baeldung.com/jackson-json-view-annotation
[Jackson's Serialization Views],
which allow rendering only a subset of all fields in an `Object`. To use it with
`@ResponseBody` or `ResponseEntity` controller methods, you can use Jackson's
`@JsonView` annotation to activate a serialization view class, as the following example shows:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录