Java-Class-C:org.springframework.http.HttpEntity
| ylbtech-Java-Class-C:org.springframework.http.HttpEntity |
| 1.返回顶部 |
//封装成一个请求对象
HttpEntity entity = new HttpEntity(requestParam, headers);
| 2.返回顶部 |
| 3.返回顶部 |
| 4.返回顶部 |
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
// package org.springframework.http; import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
import org.springframework.util.ObjectUtils; public class HttpEntity<T> {
public static final HttpEntity<?> EMPTY = new HttpEntity();
private final HttpHeaders headers;
@Nullable
private final T body; protected HttpEntity() {
this((Object)null, (MultiValueMap)null);
} public HttpEntity(T body) {
this(body, (MultiValueMap)null);
} public HttpEntity(MultiValueMap<String, String> headers) {
this((Object)null, headers);
} public HttpEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers) {
this.body = body;
HttpHeaders tempHeaders = new HttpHeaders();
if (headers != null) {
tempHeaders.putAll(headers);
} this.headers = HttpHeaders.readOnlyHttpHeaders(tempHeaders);
} public HttpHeaders getHeaders() {
return this.headers;
} @Nullable
public T getBody() {
return this.body;
} public boolean hasBody() {
return this.body != null;
} public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
} else if (other != null && other.getClass() == this.getClass()) {
HttpEntity<?> otherEntity = (HttpEntity)other;
return ObjectUtils.nullSafeEquals(this.headers, otherEntity.headers) && ObjectUtils.nullSafeEquals(this.body, otherEntity.body);
} else {
return false;
}
} public int hashCode() {
return ObjectUtils.nullSafeHashCode(this.headers) * 29 + ObjectUtils.nullSafeHashCode(this.body);
} public String toString() {
StringBuilder builder = new StringBuilder("<");
if (this.body != null) {
builder.append(this.body);
builder.append(',');
} builder.append(this.headers);
builder.append('>');
return builder.toString();
}
}
| 5.返回顶部 |
| 6.返回顶部 |
![]() |
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
Java-Class-C:org.springframework.http.HttpEntity的更多相关文章
- Spring整合Mybatis报 java.lang.ClassNotFoundException:org.springframework.core.metrics.ApplicationStartup,即:spring的版本过高,采用RELEASE稳定版
1.遇到的问题: 今天在弄spring整合mybatis的时候遇到一个小问题,如图所示: 简单来说:就是我的spring的xml文件没找到,我就奇了怪了,我所有的配置都没问题啊! 我pom.xml配置 ...
- Spring 整合 Flex (BlazeDS)无法从as对象 到 Java对象转换的异常:org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.Date' to required type 'java.sql.Timestamp' for property 'wfsj'; nested exception is java.lang.Ill
异常信息如下: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value ...
- 【spring mvc】后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface
后台spring mvc接收List参数报错如下:org.springframework.beans.BeanInstantiationException: Failed to instantiate ...
- SSM报错:No converter found for return value of type: class java.util.ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter
我使用的是SSM框架,是在编写测试RESTFUL接口的时候出现, @RequestMapping(value = "/selectAll", method = RequestMet ...
- Java-Class-C:org.springframework.http.ResponseEntity
ylbtech-Java-Class-C:org.springframework.http.ResponseEntity 1.返回顶部 1. org.springframework.http Clas ...
- Java-Class-C:org.springframework.web.client.RestTemplate
ylbtech-Java-Class-C:org.springframework.web.client.RestTemplate 1.返回顶部 1. org.springframework.web.c ...
- Java Web系列:Spring Boot 基础
Spring Boot 项目(参考1) 提供了一个类似ASP.NET MVC的默认模板一样的标准样板,直接集成了一系列的组件并使用了默认的配置.使用Spring Boot 不会降低学习成本,甚至增加了 ...
- Java Web系列:Spring Boot 基础 (转)
Spring Boot 项目(参考1) 提供了一个类似ASP.NET MVC的默认模板一样的标准样板,直接集成了一系列的组件并使用了默认的配置.使用Spring Boot 不会降低学习成本,甚至增加了 ...
- Spring MVC报异常:org.springframework.web.util.NestedServletException: Request processing failed
在使用SpringMVC绑定基本类型(如String,Integer等)参数时,应通过@RequestParam注解指定具体的参数名称,否则,当源代码在非debug模式下编译后,运行时会引发Handl ...
随机推荐
- (一)CGI (通用网关接口) 简介
CGI (通用网关接口)公共网关接口(Common Gateway Interface,CGI)是Web 服务器运行时外部程序的规范,按CGI 编写的程序可以扩展服务器功能.CGI 应用程序能与浏览器 ...
- v-on 绑定单个或多个事件
<div id="app07"> <!-- v-on:click 鼠标点击事件--> <a v-on:click="DoSomething& ...
- 预处理+状态压缩+剪枝——codefoece 1209E
那一步剪枝实在是没想到 #include<bits/stdc++.h> using namespace std; #define N 2005 struct Col{ ],Max[< ...
- NodeJS+Express+mySQL服务端开发详解
随着NodeJS的发展,现在已经被很多人熟知,NodeJS已经成为了前端开发人员必备的技能.本文不会对NodeJS过多介绍 如果你感兴趣可以访问NodeJS 官网, 维基百科 本文是利用NodeJS+ ...
- php开发面试题---1、php常用面试题一(PHP有哪些特性)
php开发面试题---1.php常用面试题一(PHP有哪些特性) 一.总结 一句话总结: ①.混合语法:php独特混合了C,Java,Prel以及PHP自创的语法. ②.为动态网页而生:可以比CGI或 ...
- Tomcat运行错误示例
tomcat运行错误示例 当出现这种错误时,如果是自己配置的tomcat,需要找/conf/server.xml文件. 如果是使用的eclipse tomcat 插件,需要在你的工作空间 找到 如下文 ...
- 2、Android自动测试之Monkey工具
Android自动测试之Monkey工具 APP测试工作中经常会听到领导说,APP压力测试做了吗?刚入行时,不知道什么是 APP压力测试,找了半天没找到自己想要的.过了几年,回头想这个问题,发现牵扯了 ...
- PAT_A1103#Integer Factorization
Source: PAT A1103 Integer Factorization (30 分) Description: The K−P factorization of a positive inte ...
- 【Stanford Machine Learning Open Course】学习笔记目录
这里是斯坦福大学机器学习网络课程的学习笔记. 课程地址是:https://class.coursera.org/ml-2012-002/lecture/index 课程资料百度网盘分享链接:https ...
- 豆瓣图书Top250
从豆瓣图书Top250抓取数据,并通过词云图展示 导入库 from lxml import etree #解析库 import time #时间 import random #随机函数 import ...
