-
curl error 18: transfer closed with outstanding read data remaining
现象 curl发起请求时,请求体中包含了最后第二行错误信息。 ❯ curl -vv -s -o /dev/null http://localhost:8081/
-
Keycloak HTTP Admin 管理接口
生成 token POST /realms/{realm}/protocol/openid-connect/token 使用admin-cli这个client,
2023-08-30, Views: 1560 , Topics: Keycloak
-
Spring Boot Thymeleaf URL 链接
@{} 使用@{}表示URL链接,GET请求中使用()表示请求参数。 <link rel="shortcut icon" th:href="@{/favi
2023-08-29, Views: 1371 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 字符串拼接
使用 + 号 将常量字符串使用单引号''括起来,变量使用${}表示,使用+号联结。 <a th:href="'/p/' + ${post.id} + '.
2023-08-28, Views: 1554 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 时间处理类
Java LocalDateTime 类 获取当前时间 <div th:text="${#temporals.createNow()}"></
2023-08-25, Views: 1469 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 获取常量
需求 使用Thymeleaf在HTML中获取Java代码中的常量。 常量 public interface Endpoint { String HOM
2023-08-24, Views: 1572 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 获取 Bean 等容器中的对象
需求 获取@Bean、@Component、@Configuration等Spring自动注入到的容器对象。 ${@} 使用${@}语法,获取容器中的对象。 其
2023-08-23, Views: 1366 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 在 JavaScript 代码中的使用
[[]] 在JavaScript代码中渲染变量,使用[[${var}]],会转义特殊HTML字符。 [()] 在JavaScript代码中渲染变量,使用[(${
2023-08-22, Views: 2116 , Topics: Spring Boot Thymeleaf JavaScript
-
Spring Boot Thymeleaf 3 获取请求的 Uri 路径
需求 由于Thymeleaf3跟随Spring Boot3进行了版本更新,Java扩展包的命名空间由JavaEE改成了JakartaEE。 Thymeleaf3
2023-08-21, Views: 1984 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 循环遍历
th:each ${posts}是从Controller中的Model对象中添加进来的,使用th:each进行遍历,post是临时变量。 <ul th:e
2023-08-18, Views: 1811 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 国际化 i18n
语法 #{} 示例 在th:text中使用#{}引入Resource Bundle中的i18n资源。 <a th:text="#{header_home}
2023-08-17, Views: 2023 , Topics: Spring Boot Thymeleaf i18n
-
Spring Boot Thymeleaf 公共布局
fragment 定义公共模板footer.html,位于resources/templates/portal文件夹下。 <footer class="f
2023-08-16, Views: 1324 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 配置多个模版路径
默认配置 从源码可知,默认会注入一个defaultTemplateResolver对象,我们也可以注入同名对象起到覆盖作用。 @AutoConfiguratio
2023-08-15, Views: 1877 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 设置模板过期时间
方法一 配置缓存 spring: thymeleaf: cache: true 设置缓存过期时间 默认使用LRU算法淘汰缓存,可以在Bean初始化后
2023-08-14, Views: 1499 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 引用外部文件夹中的模版
配置文件 spring: thymeleaf: prefix: file:templates/ 注意 文件夹后的/必须添加,否则会找不到路径,报50
2023-08-11, Views: 1350 , 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: 1265 , Topics: Linux
-
Linux 安装 perf
Alpine Linux apk add linux-tools 可能的错误 Permission denied error:1416F086:SSL rout
2023-08-08, Views: 2312 , Topics: Linux
-
Linux 查看 glibc 版本
方法一 ldd --version 输出 bash-4.4$ ldd --version ldd (GNU libc) 2.28 Copyright (C) 2
2023-08-07, Views: 1544 , Topics: Linux
-
Linux 查看 CPU 信息
命令一 lscpu 输出 [root@root /]# lscpu Architecture: x86_64 CPU op-mode(s):
2023-08-04, Views: 1289 , Topics: Linux