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 "密码强度符合标准"; } }