古道长亭

Contact me with ixiaoqiang0011@gmail.com


  • 首页

  • 归档

  • 分类

  • 关于

  • Book

  • 搜索

Java14安装

时间: 2022-05-19   |   分类: Java   | 字数: 782 字 | 阅读约: 2分钟

1.jdk最新版本

截止目前,jdk版本已经更新到14

2.jdk14新特性

https://openjdk.java.net/projects/jdk/14/ –openjdk网站我们可以看到有以下16大特性

305:	Pattern Matching for instanceof (Preview)
343:	Packaging Tool (Incubator)
345:	NUMA-Aware Memory Allocation for G1
349:	JFR Event Streaming
352:	Non-Volatile Mapped Byte Buffers
358:	Helpful NullPointerExceptions
359:	Records (Preview)
361:	Switch Expressions (Standard)
362:	Deprecate the Solaris and SPARC Ports
363:	Remove the Concurrent Mark Sweep (CMS) Garbage Collector
364:	ZGC on macOS
365:	ZGC on Windows
366:	Deprecate the ParallelScavenge + SerialOld GC Combination
367:	Remove the Pack200 Tools and API
368:	Text Blocks (Second Preview)
370:	Foreign-Memory Access API (Incubator)

下面我们就常用到的特性改变举例看一下
1.305: Pattern Matching for instanceof (Preview) instanceof新特性

阅读全文 »

Linux 使用别名免密ssh连接

时间: 2022-05-17   |   分类: Linux   | 字数: 1369 字 | 阅读约: 3分钟

1.服务器ip地址

假设有3台服务器server1,server2,server3, IP地址信息如下

  • server1 101.200.1.1(公网) 192.168.1.1(内网)
  • server2 201.200.1.1(公网) 192.168.1.2(内网)
  • server3 301.200.1.1(公网) 192.168.1.3(内网)
    我们假设3台服务器属于同一个内网(当然可以通过公网ip配置),接下来,我们配置服务器之间的别名免密登录

2.配置别名

未配置之前我们通过ssh连接远程服务器的命令是这样的

阅读全文 »

redis作接口缓存及避坑

时间: 2022-03-15   |   分类: Redis   | 字数: 763 字 | 阅读约: 2分钟

用redis作接口缓存 1.引入依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>

2.application.yml里配置cache

spring:
  redis:
    database: 0
    host: 127.0.0.1
    port: 8379
  cache:
    type: redis
    expire: 1800  #超时时间,单位秒

3.启动类添加 @EnableCaching 注解开启缓存 4.自定义redis序列化机制

阅读全文 »

mac安全删除文件

时间: 2022-01-22   |   分类: MAC   | 字数: 952 字 | 阅读约: 2分钟

Mac 像Linux一样使用命令行是很便利的, 但是在使用命令行的时候, rm -rf 命令是很常用的.

rm -rf 是一个可怕的命令, 可以理解为递归删除, 如果执行的是rm -rf /* ,那么你的系统会迅速的土崩瓦解, 尽管有些文件可能因为系统权限不足删不掉, 但是在文件丢失甚至系统不能使用的道路上,你成功了. 经常流传的程序员删库跑路, 即是执行了此命令.

阅读全文 »

雨中漫步

时间: 2022-01-19   |   分类: 生活随笔   | 字数: 233 字 | 阅读约: 1分钟

怎么也不会想到,因为疫情的影响,从过年放假一直到现在,在家里被待了这么久;

好不容易养成的跑步习惯,快荒废了…..

转眼间,春天也快要过去了, 趁着周末, 赶着春天的小尾巴, 溜到了奥森, 跑了一圈,

阅读全文 »
38 39 40 41 42 43 44 45 46
古道长亭

古道长亭

Always remember that your present situation is not your final destination. The best is yet to come.

226 日志
57 分类
104 标签
GitHub Gitee
友情链接
  • 古道长亭的BOOK
  • JAVA学习
标签云
  • Mysql
  • 搜索引擎
  • Mybatis
  • 容器
  • 架构
  • 消息队列
  • Flink
  • Sharding sphere
  • 流处理
  • 缓存
© 2019 - 2024 京ICP备19012088号-1
0%