-
Spring Boot Thymeleaf 公共布局
fragment 定义公共模板footer.html,位于resources/templates/portal文件夹下。 <footer class="f
2023-08-16, Views: 372 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 配置多个模版路径
默认配置 从源码可知,默认会注入一个defaultTemplateResolver对象,我们也可以注入同名对象起到覆盖作用。 @AutoConfiguratio
2023-08-15, Views: 631 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 设置模板过期时间
方法一 配置缓存 spring: thymeleaf: cache: true 设置缓存过期时间 默认使用LRU算法淘汰缓存,可以在Bean初始化后
2023-08-14, Views: 411 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 引用外部文件夹中的模版
配置文件 spring: thymeleaf: prefix: file:templates/ 注意 文件夹后的/必须添加,否则会找不到路径,报50
2023-08-11, Views: 389 , Topics: Spring Boot Thymeleaf
-
Linux scp 远程主机之间传输文件
从本地上传到远程 指定文件名 scp local_file remote_username@remote_ip:remote_file 示例 scp ./te
-
Linux 清理内存的 Cache、Buffer 和交换空间
查看内存 free -m 输出 root@root:~# free -g total used fre
2023-08-09, Views: 359 , Topics: Linux
-
Linux 安装 perf
Alpine Linux apk add linux-tools 可能的错误 Permission denied error:1416F086:SSL rout
2023-08-08, Views: 508 , Topics: Linux
-
Linux 查看 glibc 版本
方法一 ldd --version 输出 bash-4.4$ ldd --version ldd (GNU libc) 2.28 Copyright (C) 2
2023-08-07, Views: 352 , Topics: Linux
-
Linux 查看 CPU 信息
命令一 lscpu 输出 [root@root /]# lscpu Architecture: x86_64 CPU op-mode(s):
2023-08-04, Views: 324 , Topics: Linux
-
Linux smaps_rollup 及 status 查看 Java 进程内存占用
需求 排查Java进程频繁被Kubernetes的OOMKiller,需查看Java进程占用的总内存。 Java除了堆内存外,还有非堆内存和堆外内存。 排查工具
-
Linux 查看系统负载
需求 查看Kubernetes中Pod的负载。 top 可能很多容器没有内置top命令。 uptime 使用uptime命令也可以查看负载情况。但同样,很多容器
2023-08-02, Views: 246 , Topics: Linux
-
Linux 查看进程启动时的命令行参数
进程命令行文件 cat /proc/[pid]/cmdline 示例 Kubernetes容器中的进程ID一般为1。 cat /proc/1/cmdline 输
2023-07-26, Views: 716 , Topics: Linux
-
Linux 查看进程启动时的环境变量值
环境变量文件 cat /proc/[pid]/environ 示例 Kubernetes容器中的进程ID一般为1。 cat /proc/1/environ 输出
2023-07-25, Views: 619 , Topics: Linux
-
Linux 命令行常用快捷键
Tab 命令补全。 Ctrl + R 搜索历史命令。(R: research) 按Enter、Ctrl + O键执行。 按Tab、Ctrl + J、Esc键将搜
2023-07-24, Views: 378 , Topics: Linux
-
Linux 命令行快捷键 Ctrl+R 搜索上一个命令和下一个命令
需求 Ctrl+R 查看帮助 man readline 方法 Ctrl+R模式下,再按Ctrl+R搜索下一个匹配的命令。 切换搜索记录 命令历史列表中,我们可以
2023-07-23, Views: 1179 , Topics: Linux
-
Linux Centos7 查看 systemctl 有哪些服务
查看 MySQL sudo systemctl list-units --type=service | grep mysql 定位 mysqld 启动配置 lo
-
Linux 快速创建大文件
fallocate 直接分配一个指定容量的真实文件,创建速度很快。 -l,默认单位为字节。也可后跟k、m、g、t、p、e来指定单位,分别代表KB、MB、GB、T
2023-07-21, Views: 428 , Topics: Linux
-
Maven 引用 Spring Boot Snapshot 和 Milestone 仓库
需求 为了试验Spring Boot的新功能,需要拉取Spring Boot的Snapshot版本和Milestone版本。 pom.xml 在工程目录的pom
2023-07-20, Views: 769 , Topics: Spring Boot Maven
-
Spring Boot 3.2 RestClient 同步 HTTP 客户端
HTTP 客户端 Spring 5.0提供了WebClient基于Spring WebFlux的异步HTTP客户端。 Spring 6.1提供了RestClie
2023-07-19, Views: 528 , Topics: Spring Boot HTTP
-
Spring Boot Callable 异步接口服务端超时后是否会继续执行业务逻辑
Controller 代码 使用了Callable作为返回值,Spring Boot会当作异步接口来处理。 @GetMapping("/timeout") pu
2023-07-18, Views: 341 , Topics: Spring Boot juc