访问https问题
访问https问题
package com.yuantiao.smartcardms.tools;
import com.alibaba.fastjson.JSONObject;
import com.yuantiao.smartcardms.util.MyX509TrustManager;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import javax.net.ssl.SSLContext;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContextBuilder;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import java.util.Map.Entry;
/**
* 跨域工具类
*
* @author CNZZ
* @time 2019-06-14
*
*/
public class CrossDomainTool {
private static Logger log = LoggerFactory.getLogger(CrossDomainTool.class);
/**
* post的req.getParameterMap()
*
* @param req
* @return
*/
public static Map<String, String> getRequestParamMap(HttpServletRequest req) {
Map<String, String> notifyMap = new HashMap<>();
Map<String, String[]> parameterMap = req.getParameterMap();
for (Entry<String, String[]> stringEntry : parameterMap.entrySet()) {
if (stringEntry.getValue() != null
&& stringEntry.getValue().length > 0) {
notifyMap.put(stringEntry.getKey(), stringEntry.getValue()[0]);
}
}
return notifyMap;
}
// /**
// * 响应
// *
// * @param response
// */
// public static void doResponse(HttpServletResponse response,
// SystemResult systemResult) {
// log.info("响应参数打印|systemResult={}",
// JSONObject.toJSONString(systemResult));
// response.setContentType("application/json");
// PrintWriter out = null;
// try {
// out = response.getWriter();
// out.write(JSONObject.toJSONString(systemResult));
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// log.error("系统响应异常|e={}", e);
// } finally {
// out.flush();
// out.close();
// }
// }
/**
* 响应
*
* @param response
*/
// public static void doResponse(HttpServletResponse response, String code,
// String msg, Object data) {
// log.info("响应参数打印|code={},msg={},data={}", code, msg, data);
// SystemResult systemResult = new SystemResult(code, msg, data);
// response.setContentType("application/json");
// PrintWriter out = null;
// try {
// out = response.getWriter();
// out.write(JSONObject.toJSONString(systemResult));
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// log.error("系统响应异常|e={}", e);
// } finally {
// out.flush();
// out.close();
// }
// }
/**
* @description:使用httpClient对象执行 post 请求
* @param: uri 需要跨域请求的uri , formDataMap 模拟表单需要提交数据 (name - value 形式)
* @author CNZZ
* @createDate 2019-05-28
*/
public static String doPost(String uri, Map<String, Object> formDataMap)
throws ClientProtocolException, IOException {
if (StringUtils.isBlank(uri)) {
return null;
}
// 1、创建httpClient 对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 2、 创建post 对象
HttpPost post = new HttpPost(uri);
// 3、 创建一个list形式数据,模拟提交表单。
List<NameValuePair> formDataList = new ArrayList<>();
// TODO: 这里可以遍历模拟表单传递过来的数据 formDataMap
Iterator<Entry<String, Object>> iterator = formDataMap.entrySet()
.iterator();
while (iterator.hasNext()) {
Entry<String, Object> next = iterator.next();
String key = next.getKey();
String value = next.getValue().toString();
formDataList.add(new BasicNameValuePair(key, value));
}
// formDataList.add(new BasicNameValuePair("ids", "110"));
// formDataList.add(new BasicNameValuePair("name", "httpClient 请求数据"));
// 4、 把表单数据包装到entity 对象中 (StringEntity)
StringEntity formData = new UrlEncodedFormEntity(formDataList, "UTF-8");
post.setEntity(formData);
//post.setHeader("Content-type", "application/json;charset=utf-8");
// 5、 执行post请求
CloseableHttpResponse response = httpClient.execute(post);
// 6、 获取响应数据
HttpEntity entity = response.getEntity();
StatusLine statusLine = response.getStatusLine();
// 7、 响应数据转换为字符串
String data = EntityUtils.toString(entity,"utf-8");
// 8、 关闭 httpClient对象、关闭 response
response.close();
httpClient.close();
return data;
}
private static CloseableHttpClient buildSSLCloseableHttpClient()
throws Exception {
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null,
new TrustStrategy() {
// 信任所有
public boolean isTrusted(X509Certificate[] chain,
String authType) throws CertificateException {
return true;
}
}).build();
// ALLOW_ALL_HOSTNAME_VERIFIER:这个主机名验证器基本上是关闭主机名验证的,实现的是一个空操作,并且不会抛出javax.net.ssl.SSLException异常。
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
sslContext, new String[] { "TLSv1" }, null,
SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
return HttpClients.custom().setSSLSocketFactory(sslsf).build();
}
// private static CloseableHttpClient getInstance() throws NoSuchProviderException, NoSuchAlgorithmException, KeyManagementException {
// // 创建SSLContext对象,并使用我们指定的信任管理器初始化
// TrustManager[] tm = { new MyX509TrustManager() };
// SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE");
// sslContext.init(null, tm, new java.security.SecureRandom());
// // 从上述SSLContext对象中得到SSLSocketFactory对象
// SSLSocketFactory ssf = sslContext.getSocketFactory();
// return HttpClients.custom().setSSLSocketFactory(ssf).build();
// }
public static String doPostSSL(String uri, Map<String, Object> formDataMap)
throws Exception {
if (StringUtils.isBlank(uri)) {
return null;
}
// 1、创建httpClient 对象
CloseableHttpClient httpClient = buildSSLCloseableHttpClient();
// 2、 创建post 对象
HttpPost post = new HttpPost(uri);
// 3、 创建一个list形式数据,模拟提交表单。
List<NameValuePair> formDataList = new ArrayList<>();
// TODO: 这里可以遍历模拟表单传递过来的数据 formDataMap
Iterator<Entry<String, Object>> iterator = formDataMap.entrySet()
.iterator();
while (iterator.hasNext()) {
Entry<String, Object> next = iterator.next();
String key = next.getKey();
String value = next.getValue().toString();
formDataList.add(new BasicNameValuePair(key, value));
}
// formDataList.add(new BasicNameValuePair("ids", "110"));
// formDataList.add(new BasicNameValuePair("name", "httpClient 请求数据"));
// 4、 把表单数据包装到entity 对象中 (StringEntity)
StringEntity formData = new UrlEncodedFormEntity(formDataList, "UTF-8");
post.setEntity(formData);
//post.setHeader("Content-type", "application/json;charset=utf-8");
// 5、 执行post请求
CloseableHttpResponse response = httpClient.execute(post);
// 6、 获取响应数据
HttpEntity entity = response.getEntity();
StatusLine statusLine = response.getStatusLine();
// 7、 响应数据转换为字符串
String data = EntityUtils.toString(entity,"utf-8");
// 8、 关闭 httpClient对象、关闭 response
response.close();
httpClient.close();
return data;
}
}
package com.zichen.xhkq.util;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.cert.CertificateException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.SortedMap;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.net.ssl.*;
import javax.security.cert.X509Certificate;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.zichen.xhkq.pojo.weixin.Wechat;
import com.zichen.xhkq.service.mine.WechatService;
/**
*
* 项目名称: 类名称:CommonUtil 类描述: 通用工具类 </br>
* 封装一个通用的工具类 CommonUtil ,用于专门获取access_token 创建人:lk 创建时间:2017-11-28 下午6:59:25
* 修改人: 修改时间:2017-11-28 下午6:59:25 修改备注:
*
* @version
*/
@Component
public class CommonUtil {
private static CommonUtil commonUtil;
@Resource
private WechatService wechatService;
// 注意此处注解
@PostConstruct
public void init() {
commonUtil = this;
commonUtil.wechatService = this.wechatService;
}
private static Logger log = LoggerFactory.getLogger(CommonUtil.class);
/**
* 发送https请求 由于反向代理于该方法2018.2.7已经在项目中被HttpClientSimple类代替
*
* @param requestUrl
* 请求地址
* @param requestMethod
* 请求方式(GET、POST)
* @param outputStr
* 提交的数据
* @return JSONObject(通过JSONObject.get(key)的方式获取json对象的属性值)
*/
public static JSONObject httpsRequest(String requestUrl, String requestMethod, String outputStr) {
JSONObject jsonObject = null;
try {
// 创建SSLContext对象,并使用我们指定的信任管理器初始化
TrustManager[] tm = { new MyX509TrustManager() };
SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE");
sslContext.init(null, tm, new java.security.SecureRandom());
// 从上述SSLContext对象中得到SSLSocketFactory对象
SSLSocketFactory ssf = sslContext.getSocketFactory();
URL url = new URL(requestUrl);
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setSSLSocketFactory(ssf);
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
// 设置请求方式(GET/POST)
conn.setRequestMethod(requestMethod);
// 当outputStr不为null时向输出流写数据
if (null != outputStr) {
OutputStream outputStream = conn.getOutputStream();
// 注意编码格式
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.close();
}
// 从输入流读取返回内容
InputStream inputStream = conn.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String str = null;
StringBuffer buffer = new StringBuffer();
while ((str = bufferedReader.readLine()) != null) {
buffer.append(str);
}
// 释放资源
bufferedReader.close();
inputStreamReader.close();
inputStream.close();
inputStream = null;
conn.disconnect();
jsonObject = JSONObject.fromObject(buffer.toString());
} catch (ConnectException ce) {
ce.printStackTrace();
log.error("连接超时:{}", ce);
} catch (Exception e) {
e.printStackTrace();
log.error("https请求异常:{}", e);
}
return jsonObject;
}
/**
* @throws CustomException
*
* @Title: getAccessTokenFromNet @Description:
* TODO(网络获取接口访问凭证,连同jsapi_ticket一起,服务号每天限制access调用10W次,
* jsapi_ticket调用500W次,所以每次获取都一同获取,并一同保存更新) @param appid @param
* appsecret @return @return AccessToken @throws
*/
public static synchronized Wechat getAccessTokenFromNet(Integer wechatStatus) {
Wechat wechat = commonUtil.wechatService.selectWechat(wechatStatus);
if (wechat != null) {
String requestUrl = Constants.ACCESSTOKEN_URL.replace("APPID", wechat.getAppid()).replace("APPSECRET",
wechat.getAppsecret());
// 发起GET请求获取凭证
JSONObject jsonObject = httpsRequest(requestUrl, "GET", null);
log.info("修改后的requestUrl" + requestUrl);
if (null != jsonObject) {
try {
wechat.setAccessToken(jsonObject.getString("access_token"));// 网络刚刚获取的access_token
wechat.setExpiresIn(jsonObject.getInt("expires_in"));
log.info("网络已经获取access_token");
String ticketUrl = Constants.JSAPI_TICKET.replace("ACCESS_TOKEN", wechat.getAccessToken());
log.info("修改后的ticketUrl" + ticketUrl);
jsonObject = httpRequest(ticketUrl, "GET", null);
if (jsonObject != null) {
wechat.setJsapiTicket(jsonObject.getString("ticket"));
}
} catch (JSONException e) {
e.printStackTrace();
log.error("获取token失败异常:{}", e);
// 获取token失败
log.error("网络获取token异常失败 errcode:{} errmsg:{}", jsonObject.getInt("errcode"),
jsonObject.getString("errmsg"));
}
}
}
return wechat;
}
/**
* URL编码(utf-8)
*
* @param source
* @return
*/
public static String urlEncodeUTF8(String source) {
String result = source;
try {
result = java.net.URLEncoder.encode(source, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return result;
}
/**
*
* FunctionName:com.zichen.base.util-CommonUtil-httpRequest
*
* @discription TODO 网络请求HTTP
* @param requestUrl
* @param requestMethod
* @param outputStr
* @return
* @throws $
* @author chensheng
* @created 2018年2月9日 下午3:23:49
*/
public static JSONObject httpRequest(String requestUrl, String requestMethod, String outputStr) {
JSONObject jsonObject = null;
try {
URL url = new URL(requestUrl);
HttpURLConnection conn = null;
trustAllHosts();
HttpsURLConnection https = (HttpsURLConnection)url.openConnection();
if (url.getProtocol().toLowerCase().equals("https")) {
https.setHostnameVerifier(new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return false;
}
});
conn = https;
} else {
conn = (HttpURLConnection) url.openConnection();
}
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
// 设置请求方式(GET/POST)
conn.setRequestMethod(requestMethod);
// 当outputStr不为null时向输出流写数据
if (null != outputStr) {
OutputStream outputStream = conn.getOutputStream();
// 注意编码格式
outputStream.write(outputStr.getBytes("UTF-8"));
outputStream.close();
}
// 从输入流读取返回内容
InputStream inputStream = conn.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "utf-8");
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String str = null;
StringBuffer buffer = new StringBuffer();
while ((str = bufferedReader.readLine()) != null) {
buffer.append(str);
}
// 释放资源
bufferedReader.close();
inputStreamReader.close();
inputStream.close();
inputStream = null;
conn.disconnect();
jsonObject = JSONObject.fromObject(buffer.toString());
} catch (ConnectException ce) {
ce.printStackTrace();
log.error("连接超时:{}", ce);
} catch (Exception e) {
e.printStackTrace();
log.error("https请求异常:{}", e);
}
return jsonObject;
}
/**
* 获取当前时间 yyyyMMddHHmmss
*
* @return String
*/
public static String getCurrTime() {
Date now = new Date();
SimpleDateFormat outFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String s = outFormat.format(now);
return s;
}
/**
* 取出一个指定长度大小的随机正整数.
*
* @param length
* int 设定所取出随机数的长度。length小于11
* @return int 返回生成的随机数。
*/
public static int buildRandom(int length) {
int num = 1;
double random = Math.random();
if (random < 0.1) {
random = random + 0.1;
}
for (int i = 0; i < length; i++) {
num = num * 10;
}
return (int) ((random * num));
}
/**
* 获取32位随机字符串
*
* @return
*/
public static String getNonceStr() {
Random random = new Random();
return SignUtil.MD5Encode(String.valueOf(random.nextInt(10000)), "UTF-8");
}
/**
* 微信支付sign签名
*
* @param characterEncoding
* @param parameters
* @return
*/
public static String createSign(String characterEncoding, SortedMap<Object, Object> parameters, String api_key) {
StringBuffer sb = new StringBuffer();
Set<Map.Entry<Object, Object>> es = parameters.entrySet();
Iterator<Map.Entry<Object, Object>> it = es.iterator();
while (it.hasNext()) {
Map.Entry<Object, Object> entry = (Map.Entry<Object, Object>) it.next();
String k = (String) entry.getKey();
Object v = entry.getValue();
/** 如果参数为key或者sign,则不参与加密签名 */
if (null != v && !"".equals(v) && !"sign".equals(k) && !"key".equals(k)) {
sb.append(k + "=" + v + "&");
}
}
System.out.println("传过来的支付密钥api_key=" + api_key);
/** 支付密钥必须参与加密,放在字符串最后面 */
sb.append("key=" + api_key);
/** 记得最后一定要转换为大写 */
String sign = SignUtil.MD5Encode(sb.toString(), characterEncoding).toUpperCase();
return sign;
}
/**
* 将请求参数转换为xml格式的string
*
* @param parameters
* @return
*/
public static String getRequestXml(SortedMap<Object, Object> parameters) {
StringBuffer sb = new StringBuffer();
sb.append("<xml>");
Set<Map.Entry<Object, Object>> es = parameters.entrySet();
Iterator<Map.Entry<Object, Object>> it = es.iterator();
while (it.hasNext()) {
Map.Entry<Object, Object> entry = (Map.Entry<Object, Object>) it.next();
String k = (String) entry.getKey();
String v = entry.getValue() + "";
if ("attach".equalsIgnoreCase(k) || "body".equalsIgnoreCase(k) || "sign".equalsIgnoreCase(k)) {
sb.append("<" + k + ">" + "<![CDATA[" + v + "]]></" + k + ">");
} else {
sb.append("<" + k + ">" + v + "</" + k + ">");
}
}
sb.append("</xml>");
return sb.toString();
}
/**
* 获取系统前一天的信息(amount=-1),当前时间(amount=0),后一天(amount=1)
*
* @param date
* @return
*/
public static String getPreDay(Date date, Integer amount) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, amount);
date = calendar.getTime();
String value = sdf.format(date);
return value;
}
public static void main(String[] args) {
System.err.println(CommonUtil.getPreDay(new Date(), -1));
}
private static void trustAllHosts() {
final String TAG = "trustAllHosts";
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, String s) throws CertificateException {
}
@Override
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, String s) throws CertificateException {
}
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[] {};
}
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// Log.i(TAG, "checkClientTrusted");
}
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
// Log.i(TAG, "checkServerTrusted");
}
} };
// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("TLS");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
e.printStackTrace();
}
}
}
访问https问题的更多相关文章
- C# 访问https 未能创建 SSL/TLS 安全通道
C# 访问https请求被中止: 未能创建 SSL/TLS 安全通道(Could not create SSL/TLS secure channel) 一般GetResponse可以直接访问https ...
- WebClient 访问https
解决SSH证书问题: webClient.getOptions().setUseInsecureSSL(true);//解决ssh证书访问https的问题
- AFNetworking 原作者都无法解决的问题: 如何使用ip直接访问https网站?
背景 最近App似乎有报异常是DNS无法解析,尝试解决此问题.搜集到的资料很少,甚至连AFN原作者都判定这可能是一个无解的问题,参见: https://github.com/AFNetworking/ ...
- 一招解决IE7无法访问https网页
很多人都遇到过这种情况: 自己的IE访问不了https的网页了,如果你百度的话,有人会告诉你注册一堆的dll文件,或者更改IE设置啦什么的.上午,我也遇到这个问题,这些方法都不管用.请教了高手,将方法 ...
- 源码编译安装 PHP5.5.0,解决curl_exec访问HTTPS返回502错误的问题(修改PATH路径)
最近碰到一个奇怪的问题, PHP使用 curl_exec 访问 HTTPS 网页时, 返回502错误, 访问HTTP网页时没有问题, 用 echo phpinfo() ; 查看, 支持op ...
- curl+个人证书(又叫客户端证书)访问https站点
摘自http://blog.csdn.net/chary8088/article/details/22990741 curl+个人证书(又叫客户端证书)访问https站点 目前,大公司的OA管理系统( ...
- 转 c#代码访问https服务器以及https的webservice
最近公司做到WebService项目,但是要通过Https调用,自己在网上搜了半天,终于实现了服务端的Https,但是一直没有找到客户端如何实现,今天终于看到这篇文章,随手记录下来. 具体代码如下: ...
- 解决python2.7.9以下版本requests访问https的问题
在python2.7.9以下版本requests访问https连接后,总会报一些关于SSL warning. 解决法子可以参考:https://urllib3.readthedocs.io/en/la ...
- 使用curl,libcurl访问Https
编译curl,libcurl 下载curl源码(git clone https://github.com/curl/curl),在目录curl\winbuild\BUILD.WINDOWS.txt文件 ...
- Python使用requests模块访问HTTPS网站报错`certificate verify failed`
使用requests模块访问HTTPS网站报错: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Nam ...
随机推荐
- mysql中group by 使用
问题描述 我现在需要查询表test,里面需要安装字段a 进行分组.分组之后还有按照b字段最大的.还要查询出字段c. 我先在使用的数据库是mysql8.0 解决 需注意: group by 分组的时候是 ...
- 第05组 Alpha事后诸葛亮
组长博客链接(2分) 组长博客链接 现代软件工程 项目Postmortem 模板(27分) 设想和目标(2分) 1.我们的软件要解决什么问题?是否定义得很清楚?是否对典型用户和典型场景有清晰的描述? ...
- Codeforces Round #594 (Div. 2) A. Integer Points 水题
A. Integer Points DLS and JLS are bored with a Math lesson. In order to entertain themselves, DLS to ...
- 通过ES6 Module看import和require区别
前言 说到import和require,大家平时开发中一定不少见,尤其是需要前端工程化的项目现在都已经离不开node了,在node环境下这两者都是大量存在的,大体上来说他们都是为了实现JS代码的模块化 ...
- PHP读取文件和目录
1:目录列表 2:文件列表
- 解决SVN 被锁且Cleanup无效问题
开发两年多,依然用svn做代码管理工具,看到隔壁java组用git,心向往之,奈何苦苦不得机会,既然用svn,那么就说一说svn碰到的问题如何解决吧. 有时候我们在提交,或者更新代码时,由于网络或其他 ...
- NOI2019退役记 upd:2019.12.1
(我把原来写的东西全部删掉了) AFO. 我退役了,\(\mbox{yyb}\)退役了. 至少,在接下来的日子里,我得投身到文化课,度过快乐的高三生活了. 这两年的\(OI\)生涯给了我很多,让我学会 ...
- WebJar的打包和使用
前言 WebJar官网:https://www.webjars.org/,对于任何与Servlet 3兼容的容器,WEB-INF/lib目录中的webjar都会自动作为静态资源提供.这是因为WEB-I ...
- 《DSLR-Quality Photos on Mobile Devices with Deep Convolutional Networks》研读笔记
<DSLR-Quality Photos on Mobile Devices with Deep Convolutional Networks>研读笔记 论文标题:DSLR-Quality ...
- PDF目录编辑器使用介绍
PDF目录编辑器使用介绍 魏刘宏 2019.06.28 PDF 是一个比较优秀的文档格式,能够保证在任何终端显示的样式是一样的.但同时也带来了一个问题,就是编辑不方便,其实这也是这个格式特意为之的,无 ...