![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
API
王小屏
这个作者很懒,什么都没留下…
展开
-
HTTP接口调用
/** * 调用对方接口方法 * @param path 对方或第三方提供的路径 * @param data 向对方或第三方发送的数据,大多数情况下给对方发送JSON数据让对方解析 */ public static void interfaceUtil(String path,String data) { try { URL url = new URL(path); //打开和url之间的连接 HttpURLConnection conn = (HttpURLConn原创 2022-03-03 10:38:38 · 2397 阅读 · 0 评论 -
Spring 框架面向切面具体项目实现
<bean id="vaildAspect" class="com.tuniu.air.ticket.channel.common.validation.ValidAspect"></bean> <aop:config> <aop:aspect ref="vaildAspect"> <aop:pointcut expression="execution(* com.zhangjian.air.ticket.channel.authen..原创 2022-02-21 10:53:06 · 363 阅读 · 0 评论 -
雪花算法参考
/** * Twitter的SnowFlake算法,使用SnowFlake算法生成一个整数,然后转化为62进制变成一个短地址URL * * https://github.com/beyondfengyu/SnowFlake */public class SnowFlakeShortUrl { /** * 起始的时间戳 */ private final static long START_TIMESTAMP = 1480166465631L; /*原创 2022-02-15 15:38:59 · 169 阅读 · 0 评论 -
Stream字符串比较,要转化Integer 调用compareTo方法,否则要重写
Stream字符串比较public static void main(String[] args) { List<Student> insureList = new ArrayList<>(); Student student1= new Student(); student1.setGrade("1-5"); Student student2= new Student(); student2.setGrade("6-7"); Stu原创 2021-09-13 16:49:58 · 1465 阅读 · 0 评论