-
Spring Boot Thymeleaf 在 JavaScript 代码中的使用
[[]] 在JavaScript代码中渲染变量,使用[[${var}]],会转义特殊HTML字符。 [()] 在JavaScript代码中渲染变量,使用[(${
2023-08-22, Views: 1574 , Topics: Spring Boot Thymeleaf JavaScript
-
Spring Boot Thymeleaf 3 获取请求的 Uri 路径
需求 由于Thymeleaf3跟随Spring Boot3进行了版本更新,Java扩展包的命名空间由JavaEE改成了JakartaEE。 Thymeleaf3
2023-08-21, Views: 1417 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 循环遍历
th:each ${posts}是从Controller中的Model对象中添加进来的,使用th:each进行遍历,post是临时变量。 <ul th:e
2023-08-18, Views: 1345 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 国际化 i18n
语法 #{} 示例 在th:text中使用#{}引入Resource Bundle中的i18n资源。 <a th:text="#{header_home}
2023-08-17, Views: 1486 , Topics: Spring Boot Thymeleaf i18n
-
Spring Boot Thymeleaf 公共布局
fragment 定义公共模板footer.html,位于resources/templates/portal文件夹下。 <footer class="f
2023-08-16, Views: 961 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 配置多个模版路径
默认配置 从源码可知,默认会注入一个defaultTemplateResolver对象,我们也可以注入同名对象起到覆盖作用。 @AutoConfiguratio
2023-08-15, Views: 1405 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 设置模板过期时间
方法一 配置缓存 spring: thymeleaf: cache: true 设置缓存过期时间 默认使用LRU算法淘汰缓存,可以在Bean初始化后
2023-08-14, Views: 1046 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 引用外部文件夹中的模版
配置文件 spring: thymeleaf: prefix: file:templates/ 注意 文件夹后的/必须添加,否则会找不到路径,报50
2023-08-11, Views: 988 , 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: 901 , Topics: Linux
-
Linux 安装 perf
Alpine Linux apk add linux-tools 可能的错误 Permission denied error:1416F086:SSL rout
2023-08-08, Views: 1599 , Topics: Linux
-
Linux 查看 glibc 版本
方法一 ldd --version 输出 bash-4.4$ ldd --version ldd (GNU libc) 2.28 Copyright (C) 2
2023-08-07, Views: 987 , Topics: Linux
-
Linux 查看 CPU 信息
命令一 lscpu 输出 [root@root /]# lscpu Architecture: x86_64 CPU op-mode(s):
2023-08-04, Views: 868 , Topics: Linux
-
Linux smaps_rollup 及 status 查看 Java 进程内存占用
需求 排查Java进程频繁被Kubernetes的OOMKiller,需查看Java进程占用的总内存。 Java除了堆内存外,还有非堆内存和堆外内存。 排查工具
-
Linux 查看系统负载
需求 查看Kubernetes中Pod的负载。 top 可能很多容器没有内置top命令。 uptime 使用uptime命令也可以查看负载情况。但同样,很多容器
2023-08-02, Views: 810 , Topics: Linux
-
Linux 查看进程启动时的命令行参数
进程命令行文件 cat /proc/[pid]/cmdline 示例 Kubernetes容器中的进程ID一般为1。 cat /proc/1/cmdline 输
2023-07-26, Views: 1834 , Topics: Linux
-
Linux 查看进程启动时的环境变量值
环境变量文件 cat /proc/[pid]/environ 示例 Kubernetes容器中的进程ID一般为1。 cat /proc/1/environ 输出
2023-07-25, Views: 1749 , Topics: Linux
-
Linux 命令行常用快捷键
Tab 命令补全。 Ctrl + R 搜索历史命令。(R: research) 按Enter、Ctrl + O键执行。 按Tab、Ctrl + J、Esc键将搜
2023-07-24, Views: 919 , Topics: Linux
-
Linux 命令行快捷键 Ctrl+R 搜索上一个命令和下一个命令
需求 Ctrl+R 查看帮助 man readline 方法 Ctrl+R模式下,再按Ctrl+R搜索下一个匹配的命令。 切换搜索记录 命令历史列表中,我们可以
2023-07-23, Views: 3182 , Topics: Linux
-
Linux Centos7 查看 systemctl 有哪些服务
查看 MySQL sudo systemctl list-units --type=service | grep mysql 定位 mysqld 启动配置 lo