乙巳🐍年

acc8226 的博客

Tencent/vConsole: A lightweight, extendable front-end developer tool for mobile web page.
https://github.com/Tencent/vConsole

示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
<html>
<head>
</head>
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
<script>
// VConsole 会自动挂载到 `window.VConsole`
var vConsole = new window.VConsole();
window.localStorage.efg = 'dfdf fdfe '
console.log(1234)
</script>
<body>
</body>
</html>
阅读全文 »

使用 spring-boot-starter-actuator 可以用于检测系统的健康情况、当前的Beans、系统的缓存等,具体可检测的内容参考下面的链接: https://docs.spring.io/spring-boot/docs/2.6.1/reference/htmlsingle/#actuator.endpoints.exposing

1
2
3
4
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

浏览器访问 localhost:8080/actuator 即可。

默认情况下,通过 web 端只可访问 http://localhost:8080/actuator/health ,可在 application.properties 中配置访问的 uri、权限、端口等

1
2
3
4
5
6
# 访问端口
management.server.port=8081
# 根路径
management.endpoints.web.base-path=/actuator/z
# web 端允许的路径
management.endpoints.web.exposure.include=*

通过以上配置,开放了 web 端的所有访问,可通过访问 http://localhost:8081/actuator/z/beans 来查看系统中的 beans

参考

spring-boot-starter-actuator 作用及基本使用_GetcharZp 的博客-CSDN 博客
https://blog.csdn.net/qq_39042062/article/details/121943803

引入依赖

1
2
3
4
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
注解 功能
@AssertFalse 可以为 null,如果不为 null 的话必须为 false
@AssertTrue 可以为 null,如果不为 null 的话必须为 true
@DecimalMax 设置不能超过最大值
@DecimalMin 设置不能超过最小值
@Digits 设置必须是数字且数字整数的位数和小数的位数必须在指定范围内
@Future 日期必须在当前日期的未来
@Past 日期必须在当前日期的过去
@Max 最大不得超过此最大值
@Min 最大不得小于此最小值
@NotNull 不能为null,可以是空
@Null 必须为null
@Pattern 必须满足指定的正则表达式
@Size 集合、数组、map 等的 size()值必须在指定范围内
@Email 必须是 email 格式
@Length 长度必须在指定范围内
@NotBlank 字符串不能为null,字符串trim()后也不能等于""
@NotEmpty 不能为null,集合、数组、map等size()不能为0;字符串trim()后可以等于""
@Range 值必须在指定范围内
@URL 必须是一个URL

问题

HV000030: No validator could be found for constraint ‘javax.validation.constraints.NotBlank’

Integer 和 Long 类型的参数不能用 @NotBlank 进行校验,要用 @NotNull 来校验

由于新搬的出租房没有网,用热点用嫌贵。可能临时断网或者长期断网几个月。所以只能离线了。好处是这两个盘的文件可以终于有时间可以归纳整理文件了。前提是有资源积累到了本地。

听音乐

PC 离线: 播放本地歌曲
手机: 阿里云盘已下载的歌曲

看视频

PC 离线: b 站客户端离线下载 / 阿里云盘已下载视频 / 迅雷下载资源

注1:哔哩哔哩 PC 版可离线下载视频。
注2:这里有两个工具可以辅助下载视频。

1. 在线工具:哔哩哔哩(bilibili)视频解析下载 - 保存 B 站视频到手机、电脑

阅读全文 »

服务监控

概览

服务监视功能适用于希望获得被监视基础设施的高级(业务)视图的人。一般情况下,我们对低级别细节不感兴趣,例如磁盘空间不足、处理器负载高等。我们感兴趣的是整个 IT 部门提供的服务的整体可用性,以及对识别 IT 基础设施的薄弱环节、各种 IT 服务的 SLA、现有 IT 基础设施的结构以及其他更高级别的信息。

Zabbix 服务监控为所有提到的问题提供了答案。

服务监控允许创建监控数据的层次结构表示。

一个非常简单的服务结构可能如下所示:

1
Service||-Workstations| || |-Workstation1| || |-Workstation2||-Servers
阅读全文 »
0%