1
13693261870
2024-12-08 51fa0405c43598cfc4ae2a4603b12cbd2d57745b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.se.system.controller;
 
import com.se.common.core.web.controller.BaseController;
import com.se.system.utils.CheckPwdUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@SuppressWarnings("ALL")
public class HealthController extends BaseController {
    @GetMapping("/health")
    public long health() {
        return System.currentTimeMillis();
    }
 
    @GetMapping("/test")
    public String test() {
        int level = CheckPwdUtils.checkPwdLevel("12345A74.a");
 
        // 密码必须包含大写字母、小写字母、数字和特殊字符,且长度是8位以上
        if (level <= 2) return "密码强度过弱";
 
        if (level < 5) return "密码强度中等";
 
        return "密码强度符合标准";
    }
}