文章列表
1、 Redis简介
redis是Nosql数据库中使用较为广泛的非关系型内存数据库,redis内部是一个key-value存储系统。它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set –有序集合)和hash(哈希类型,类似 ...
spring task调度
- 博客分类:
- spring
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://w ...
1: redis.properteis 连接需要的配置信息
redis.sentinels.host1=sen201.dev.rs.com
redis.sentinels.host2=sen201.dev.rs.com
redis.sentinels.host3=sen201.dev.rs.com
redis.sentinels.port1=26380
redis.sentinels.port2=26380
redis.sentinels.port3=26380
2: spring-redis.xml 配置文件
<bean id="redisSen ...
package com.Annual.util;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
public class AnnualUtil {
/**
* 产生 0 到 max 的随机数
* @param max
* @return
*/
public static int random(int max) {
Random random = new Random();
return random.nex ...
package com.Annual.Httpclient;
import java.io.UnsupportedEncodingException;
/**
* 封装HttpClient返回数据
* <p>
*
* @Date 2016-8-11
*/
public class ResponseContent {
private String encoding;
private byte[] contentBytes;
private int statusCode;
private String contentTyp ...
package com.Annual.Httpclient;
import java.io.File;
import java.util.Iterator;
import java.util.Map;
import org.apache.http.entity.mime.content.ByteArrayBody;
import org.apache.http.entity.mime.content.FileBody;
public class HttpHelper {
//请求读取超时
private Integer socketTimeout = 6000;
//URL的连 ...
package com.Annual.Httpclient;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.CodingErrorAction;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509 ...