接口 EntityResponse<T>
- 类型参数:
T
- the entity type
- 所有超级接口:
ServerResponse
public interface EntityResponse<T> extends ServerResponse
Entity-specific subtype ofServerResponse
that exposes entity data.- 从以下版本开始:
- 5.2
- 作者:
- Arjen Poutsma
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interface
EntityResponse.Builder<T>
Defines a builder forEntityResponse
.从接口继承的嵌套类/接口 org.springframework.web.servlet.function.ServerResponse
ServerResponse.BodyBuilder, ServerResponse.Context, ServerResponse.HeadersBuilder<B extends ServerResponse.HeadersBuilder<B>>
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 T
entity()
Return the entity that makes up this response.static <T> EntityResponse.Builder<T>
fromObject(T t)
Create a builder with the given object.static <T> EntityResponse.Builder<T>
fromObject(T t, ParameterizedTypeReference<T> entityType)
Create a builder with the given object and type reference.从接口继承的方法 org.springframework.web.servlet.function.ServerResponse
cookies, headers, rawStatusCode, statusCode, writeTo
方法详细资料
fromObject
static <T> EntityResponse.Builder<T> fromObject(T t)
Create a builder with the given object.- 类型参数:
T
- the type of element contained in the publisher- 参数:
t
- the object that represents the body of the response- 返回:
- the created builder
fromObject
static <T> EntityResponse.Builder<T> fromObject(T t, ParameterizedTypeReference<T> entityType)
Create a builder with the given object and type reference.- 类型参数:
T
- the type of element contained in the publisher- 参数:
t
- the object that represents the body of the responseentityType
- the type of the entity, used to capture the generic type- 返回:
- the created builder