1
13693261870
2024-12-08 51fa0405c43598cfc4ae2a4603b12cbd2d57745b
se-modules/se-system/src/main/java/com/se/system/controller/HealthController.java
@@ -1,6 +1,7 @@
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;
@@ -8,7 +9,19 @@
@SuppressWarnings("ALL")
public class HealthController extends BaseController {
    @GetMapping("/health")
    public long test() {
    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 "密码强度符合标准";
    }
}