package com.webmanage.config; import org.springframework.util.StringUtils; /** * 检测配置值是否为加密格式的工具 */ public class EncryptedPropertyDetector { private static final String PREFIX = "AES:"; public static boolean isEncrypted(String value) { return StringUtils.hasText(value) && value.startsWith(PREFIX); } public static String stripPrefix(String value) { if (!isEncrypted(value)) { return value; } return value.substring(PREFIX.length()); } }