-
HTML 防止爬虫抓取方法
robots.txt 设置robots.txt爬虫抓取规则,一般放置在域名根目录。 如:不允许抓取/admin下的路径及子路径。 User-agent: * D
2023-09-13, Views: 413 , Topics: HTML
-
Chrome 设置 HTTP 网站允许开启麦克风
需求 内网环境下载的网站,无法开启麦克风权限。 解决 在Insecure origins treated as secure选项下,添加指定的http内网IP地
2023-09-12, Views: 888 , Topics: Chrome
-
Chrome network 过滤请求
过滤方法 method:GET 过滤状态码 status-code:200 过滤 url url:www.baidu.com 过滤 mime-type mime
2023-09-11, Views: 268 , Topics: Chrome
-
使用 SDKMAN! 管理 JDK
安装 curl -s "https://get.sdkman.io" | bash 查看 JDK 信息 Status这列标识是否安装,是否是本地下载的。 Ide
-
Docker Dockerfile ADD 与 COPY 指令的区别
ADD 如果源文件是个压缩文件,则Docker会自动解压。 可以从网络上下载资源。 COPY 不会自动解压。 不可以从网络上下载资源。
2023-09-06, Views: 336 , Topics: Docker
-
Alpine Linux 查看发行版本
需求 根据Alpine Linux的版本,查找对应依赖的版本。 https://pkgs.alpinelinux.org/packages 方法一 cat /e
2023-09-05, Views: 699 , Topics: Linux Alpine Linux
-
OpenLDAP 简介
全称 Lightweight Directory Access Protocol,缩写:LDAP 简介 目录服务是基于应用协议X.500实现的,而LDAP是X.
2023-09-04, Views: 330 , Topics: OpenLDAP
-
curl 不打印返回值信息
需求 curl不打印返回值信息,只打印HTTP请求头、返回头、连接信息等。 为了排查Chrome开发者工具network选项卡中status显示(failed)
2023-09-01, Views: 1010 , Topics: curl
-
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: 344 , Topics: Keycloak
-
Spring Boot Thymeleaf URL 链接
@{} 使用@{}表示URL链接,GET请求中使用()表示请求参数。 <link rel="shortcut icon" th:href="@{/favi
2023-08-29, Views: 323 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 字符串拼接
使用 + 号 将常量字符串使用单引号''括起来,变量使用${}表示,使用+号联结。 <a th:href="'/p/' + ${post.id} + '.
2023-08-28, Views: 291 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 时间处理类
Java LocalDateTime 类 获取当前时间 <div th:text="${#temporals.createNow()}"></
2023-08-25, Views: 380 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 获取常量
需求 使用Thymeleaf在HTML中获取Java代码中的常量。 常量 public interface Endpoint { String HOM
2023-08-24, Views: 445 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 获取 Bean 等容器中的对象
需求 获取@Bean、@Component、@Configuration等Spring自动注入到的容器对象。 ${@} 使用${@}语法,获取容器中的对象。 其
2023-08-23, Views: 365 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 在 JavaScript 代码中的使用
[[]] 在JavaScript代码中渲染变量,使用[[${var}]],会转义特殊HTML字符。 [()] 在JavaScript代码中渲染变量,使用[(${
2023-08-22, Views: 486 , Topics: Spring Boot Thymeleaf JavaScript
-
Spring Boot Thymeleaf 3 获取请求的 Uri 路径
需求 由于Thymeleaf3跟随Spring Boot3进行了版本更新,Java扩展包的命名空间由JavaEE改成了JakartaEE。 Thymeleaf3
2023-08-21, Views: 511 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 循环遍历
th:each ${posts}是从Controller中的Model对象中添加进来的,使用th:each进行遍历,post是临时变量。 <ul th:e
2023-08-18, Views: 479 , Topics: Spring Boot Thymeleaf
-
Spring Boot Thymeleaf 国际化 i18n
语法 #{} 示例 在th:text中使用#{}引入Resource Bundle中的i18n资源。 <a th:text="#{header_home}
2023-08-17, Views: 518 , Topics: Spring Boot Thymeleaf i18n
-
Spring Boot Thymeleaf 公共布局
fragment 定义公共模板footer.html,位于resources/templates/portal文件夹下。 <footer class="f
2023-08-16, Views: 371 , Topics: Spring Boot Thymeleaf