From 18682e83258756a3c28dc26f47ad918b59965006 Mon Sep 17 00:00:00 2001 From: siujamo Date: Wed, 4 Jun 2025 11:27:55 +0800 Subject: [PATCH 1/2] fix: remove impl note --- .../main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/guid/src/main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java b/guid/src/main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java index 309837d..88b35f3 100644 --- a/guid/src/main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java +++ b/guid/src/main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java @@ -33,8 +33,6 @@ *

* The generated UUID adheres strictly to the layout and variant bits of UUID version 7 as defined in the specification. *

- * - * @implNote This class implements the {@link GuidCreator} interface, providing UUID instances as unique identifiers. */ public class SequentialUuidCreator implements GuidCreator { From f5bcdacb2e0bc6a7f1254c08b10f963f3b797315 Mon Sep 17 00:00:00 2001 From: siujamo Date: Wed, 4 Jun 2025 11:31:56 +0800 Subject: [PATCH 2/2] refactor: mark `PropertyGuard` as deprecated and for removal --- .../propertyguard/autoconfiguration/PropertyGuard.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/property-guard-spring-boot-starter/src/main/java/com/onixbyte/propertyguard/autoconfiguration/PropertyGuard.java b/property-guard-spring-boot-starter/src/main/java/com/onixbyte/propertyguard/autoconfiguration/PropertyGuard.java index 8ed227a..7a182d0 100644 --- a/property-guard-spring-boot-starter/src/main/java/com/onixbyte/propertyguard/autoconfiguration/PropertyGuard.java +++ b/property-guard-spring-boot-starter/src/main/java/com/onixbyte/propertyguard/autoconfiguration/PropertyGuard.java @@ -27,6 +27,7 @@ import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.SimpleCommandLinePropertySource; +import java.security.GeneralSecurityException; import java.util.HashMap; import java.util.Optional; @@ -65,6 +66,7 @@ * @see EnvironmentPostProcessor * @since 1.1.0 (3.3.2 of MyBatis-Plus) */ +@Deprecated(forRemoval = true) public class PropertyGuard implements EnvironmentPostProcessor { private final static Logger log = LoggerFactory.getLogger(PropertyGuard.class); @@ -99,7 +101,11 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp for (var name : source.getPropertyNames()) { if (source.getProperty(name) instanceof String str) { if (str.startsWith("%s:".formatted(PREFIX))) { - map.put(name, AesUtil.decrypt(str.substring(3), encryptionKey)); + try { + map.put(name, AesUtil.decrypt(str.substring(3), encryptionKey)); + } catch (GeneralSecurityException e) { + log.error("Unable to decrypt param {}", name); + } } } }