- 博客(10)
- 收藏
- 关注
原创 springboot的Redis配置类
package com.example.redis.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper;...
2019-11-12 17:13:45
106
原创 Redis工具类
package com.example.redis.util; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Componen...
2019-11-12 17:12:42
99
原创 RSA非对称加密工具类
package com.usthe.bootshiro.util; import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import java.nio.charset.StandardCharsets; import java.security.*; import java.security.in...
2019-10-08 14:26:20
221
原创 MD5加密工具
package com.usthe.bootshiro.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; public class Md5Util { private ...
2019-10-08 14:23:43
74
原创 Java位移运算
Java位移运算 左移:<< 正数负数都在右侧补0,负数最高位不变(a >> b 把a向左移动b位) 右移:>> 正数补0, 负数最高位不变,空位补1(a << b 把a向右移动b位) 无符号右移:>>> (a>>>b 将二进制形式的a逐位右移b位,最高位空出来的b位补0) 例如: (1...
2019-09-16 16:38:37
134
原创 文件下载
package com.spiov.cloud.sys.util; import org.apache.commons.io.FileUtils; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.springframework.h...
2019-08-12 14:11:49
198
原创 反射获取对象的属性并为其赋值
/** * @description: 判断对象的属性值是否为空,如果类型是包装类并且为空,就为其赋值对应基本类型的默认值 * @param model 需要检查的对象 * @author: duyq * @date: 2019/8/7 9:50 * @return: T */ public static<T> T c...
2019-08-07 10:59:02
871
原创 java8日期时间处理工具类
import java.time.*; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.util.Date; /** * @ClassName LocalDateUtils * @Description java8日期时间处理工具类 * @Author ...
2019-08-01 13:56:48
174
原创 统计数组中连续重复数据出现的次数和起始下标
public static void main(String[] args) { Map<String, String> map = new TreeMap<>(); String[] str = {"A","A","B","B","A","A","A","A","B","B","B","A","A","A"}; int nu...
2019-07-29 09:47:23
921
原创 spring Cloud之Eureka
1.eureka组件简介 Eureka是Netfilx开源的服务发现组件,本身是一个基于rest的服务,它包含client和server两部分。 Spirng Cloud将它集成在子项目Spirng Cloud Netfilx中,从而实现服务的注册和发现 2.eureka中的server和client的介绍及特点 Eureka Server:提供服务发现的能力,各个微服务启动时...
2019-01-09 20:44:51
66
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人