摘要: /** *此方法将始终缓存-128 到 127(包括端点)范围内的值,并可以缓存此范围之外的其他值。 */ public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) retu 阅读全文
posted @ 2022-01-15 17:25 小污龟 阅读(92) 评论(0) 推荐(0) 编辑
摘要: hashCode()与 equals() 面试官可能会问你:“你重写过 hashcode 和 equals么,为什么重写 equals 时必须重写 hashCode 方法?” 1)hashCode()介绍: hashCode() 的作用是获取哈希码,也称为散列码;它实际上是返回一个 int 整数。这 阅读全文
posted @ 2022-01-15 17:17 小污龟 阅读(362) 评论(0) 推荐(0) 编辑
摘要: HashSet 无序不重复 TreeSet 有序不重复(需要实现排序方式 new MyCompare()) TreeMap 按照Key 排序 LinkedHashMap 按照put元素的顺序 排序 阅读全文
posted @ 2021-01-14 19:03 小污龟 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 转自:https://zhuanlan.zhihu.com/p/80384308 配置文件能配置的属性参照https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/htmlsingle/#common-application-pr 阅读全文
posted @ 2020-12-15 15:43 小污龟 阅读(88) 评论(0) 推荐(0) 编辑
摘要: java 类加载器 1、虚拟机自带的加载器 2、启动类BootStrapt(根)加载器 3、Ext(扩展)加载器 4、AppClassLoader 应用程序加载器 阅读全文
posted @ 2020-11-18 18:47 小污龟 阅读(80) 评论(0) 推荐(0) 编辑
摘要: user www www; worker_processes auto; error_log /data/wwwlogs/error_nginx.log crit; pid /var/run/nginx.pid; worker_rlimit_nofile 51200; events { use ep 阅读全文
posted @ 2020-11-05 17:38 小污龟 阅读(4702) 评论(0) 推荐(0) 编辑
摘要: package com.xf.config; import java.util.Date; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org. 阅读全文
posted @ 2020-08-26 18:26 小污龟 阅读(3766) 评论(1) 推荐(0) 编辑
摘要: 首先完全组 开放6379端口 修改 /usr/local/redis/redis.conf 文件 一、bind 127.0.0.1 都改成 0.0.0.0 (0.0.0.0表示不限制ip) 二、daemonize yes 三、设置密码 # requirepass foobared 下面加上这个 12 阅读全文
posted @ 2020-08-24 16:44 小污龟 阅读(1268) 评论(0) 推荐(0) 编辑
摘要: 先看看没用Spring Security时 定一个接口 import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestControll 阅读全文
posted @ 2020-08-22 12:48 小污龟 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 一、场景: 本地 开发分支(dev_1.0)开发中,代码有改动,有同事提交了代码在master 分支, 现在需要 同步master分支的代码 到(dev_1.0)分支 步骤: git branch 查看当前在哪个分支 git branch Task1-William * dev_1.0 master 阅读全文
posted @ 2020-08-20 18:23 小污龟 阅读(8328) 评论(0) 推荐(0) 编辑