Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
a87b319a
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
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,体验更适合开发者的 AI 搜索 >>
提交
a87b319a
编写于
8月 15, 2018
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
7e917335
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
14 deletion
+12
-14
src/docs/asciidoc/web/webflux.adoc
src/docs/asciidoc/web/webflux.adoc
+9
-10
src/docs/asciidoc/web/webmvc.adoc
src/docs/asciidoc/web/webmvc.adoc
+3
-4
未找到文件。
src/docs/asciidoc/web/webflux.adoc
浏览文件 @
a87b319a
...
...
@@ -1749,7 +1749,7 @@ controller. The following code snippet shows the usage:
[TIP]
====
Unlike the Servlet API "request parameter" concept that conflate query parameters, form
Unlike the Servlet API "request parameter" concept that conflate
s
query parameters, form
data, and multiparts into one, in WebFlux each is accessed individually through the
`ServerWebExchange`. While `@RequestParam` binds to query parameters only, you can
use data binding to apply query parameters, form data, and multiparts to a
...
...
@@ -1758,17 +1758,17 @@ use data binding to apply query parameters, form data, and multiparts to a
Method parameters using using the `@RequestParam` annotation are required by default, but
you can specify that a method parameter is optional by setting ``@RequestParam``'
s
`
required
`
flag
to
`
false
`
or
by
declaring
the
argument
with
a
n
`
java
.
util
.
Optional
`
`
required
`
flag
to
`
false
`
or
by
declaring
the
argument
with
a
`
java
.
util
.
Optional
`
wrapper
.
Type
conversion
is
applied
automatically
if
the
target
method
parameter
type
is
not
`
String
`.
See
<<
mvc
-
ann
-
typeconversion
>>.
When
an
`@
RequestParam
`
annotation
is
declared
as
`
Map
<
String
,
String
>`
or
When
an
`@
RequestParam
`
annotation
is
declared
on
a
`
Map
<
String
,
String
>`
or
`
MultiValueMap
<
String
,
String
>`
argument
,
the
map
is
populated
with
all
query
parameters
.
Note
that
use
of
`@
RequestParam
`
is
optional
,
e
.
g
.
to
set
its
attributes
.
By
default
any
argument
that
is
a
simple
value
type
,
as
determined
by
Note
that
use
of
`@
RequestParam
`
is
optional
--
for
example
,
to
set
its
attributes
.
By
default
any
argument
that
is
a
simple
value
type
,
as
determined
by
{
api
-
spring
-
framework
}/
beans
/
BeanUtils
.
html
#
isSimpleProperty
-
java
.
lang
.
Class
-[
BeanUtils
#
isSimpleProperty
],
and
is
not
resolved
by
any
other
argument
resolver
,
is
treated
as
if
it
was
annotated
with
`@
RequestParam
`.
...
...
@@ -2275,12 +2275,11 @@ on a container object that specifies request headers and body. Below is an examp
}
----
As
many return values, `ResponseEntity` can be wrapped by a reactive type such as `Mono`.
In case of a `Mono<ResponseEntity>` return type, the empty `Mono` case
will be
As
is the case for many return values, `ResponseEntity` can be wrapped by a reactive type
such as `Mono`. In case of a `Mono<ResponseEntity>` return type, an empty `Mono`
will be
automatically converted to a `ResponseEntity` with an empty body and an HTTP 404 status,
so you don'
t
need
to
chain
your
`
Mono
`
with
an
`
switchIfEmpty
`
/
`
defaultIfEmpty
`
for
simple
HTTP
404
responses
.
Here
's an example of this:
so you don'
t
need
to
chain
your
`
Mono
`
with
a
`
switchIfEmpty
`
/
`
defaultIfEmpty
`
for
simple
HTTP
404
responses
.
Here
's an example of this:
[source,java,indent=0]
[subs="verbatim,quotes"]
...
...
src/docs/asciidoc/web/webmvc.adoc
浏览文件 @
a87b319a
...
...
@@ -2661,10 +2661,9 @@ on a container object that specifies request headers and body. Below is an examp
----
In case of a `java.util.Optional
<ResponseEntity>
` return type, the `Optional.empty()`
case will be automatically converted to a `ResponseEntity` with an empty body
and an HTTP 404 status, so you don't need to chain your optional with
an `orElse` / `orElseGet` for simple HTTP 404 responses.
Here's an example of this:
case will be automatically converted to a `ResponseEntity` with an empty body and an HTTP
404 status, so you don't need to chain your optional with an `orElse` / `orElseGet` for
simple HTTP 404 responses. Here's an example of this:
[source,java,indent=0]
[subs="verbatim,quotes"]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录