- 博客(7)
- 收藏
- 关注
原创 多线程-上锁问题
1 定义类public class Function { private static synchronized void staticFunction() { // 静态方法 for (int i = 0; i < 4; i++) { try { System.out.println(Thread.currentThread().getName() + "---" + i); Thr
2020-07-06 12:24:42
252
1
原创 自定义注解获取属性名
1 注解package com.***.***;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target(ElementType.FIELD)@Retention(RetentionPolicy.RUNTIME)publ
2020-07-04 15:53:30
835
原创 Long/Integer比较问题
int 类型比较: 结果和数值无关 int m = 128; int n = 128; System.out.println(m == n); // trueInteger 类型比较: 结果和数值有关(常量池-128~127 true), 其它的指向堆内存, 返回false Integer i = 128; Integer j = 128; System.out.println(i == j); // false 堆内存指向不一致 public static Inte.
2020-06-11 17:00:24
2429
原创 对对象里的集合进行操作后, 要不要 set 进去
测试1: 操作前集合有数据, 不用 set 可以添加成功@Test public void fun3(){ List<WaybillPrintDTO.FailureReason> failureReasons = Lists.newArrayList(); failureReasons.add(new WaybillPrintDTO.FailureReason(1L,"1L")); failureReasons.add(new WaybillPrintDTO.FailureRea
2020-06-11 10:52:40
371
原创 阿里云ESC修改主机名
1 查看主机状态[root@zhangsan /]# hostnamectl status Static hostname: zhangsan Icon name: computer-vm Chassis: vm Machine ID: ******************************** Boot ID: ******************************** Virtualization:
2020-05-27 10:58:38
169
原创 early EOF
early EOF1 错误EOF$ git clone https://gitlab.***.net***/***.gitCloning into '***'...remote: Enumerating objects: 32488, done.remote: Counting objects: 100% (32488/32488), done.remote: Compressing objects: 100% (8533/8533), done.error: RPC failed; curl
2020-05-27 10:42:46
4873
1
原创 阿里云-云服务器ECS端口开放问题
阿里云-云服务器ECS端口开放问题安装完OpenResty后: 访问 主机:80 无法访问此网站, 响应时间过长查看安全组配置: 开放了80端口查看防火墙:1. 查询80端口是否开放: no未开放 firewall-cmd --query-port=80/tcp2. 开放80端口 --permanent 永久 firewall-cmd --add-port=80/tcp --...
2020-01-13 19:48:30
353
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人