Skip to content

Commit 588e177

Browse files
authored
Merge pull request #66 from onixbyte/release/2.2.0
Release/2.2.0
2 parents d9ca38e + f5bcdac commit 588e177

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

guid/src/main/java/com/onixbyte/guid/impl/SequentialUuidCreator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
* <p>
3434
* The generated UUID adheres strictly to the layout and variant bits of UUID version 7 as defined in the specification.
3535
* </p>
36-
*
37-
* @implNote This class implements the {@link GuidCreator} interface, providing UUID instances as unique identifiers.
3836
*/
3937
public class SequentialUuidCreator implements GuidCreator<UUID> {
4038

property-guard-spring-boot-starter/src/main/java/com/onixbyte/propertyguard/autoconfiguration/PropertyGuard.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.springframework.core.env.MapPropertySource;
2828
import org.springframework.core.env.SimpleCommandLinePropertySource;
2929

30+
import java.security.GeneralSecurityException;
3031
import java.util.HashMap;
3132
import java.util.Optional;
3233

@@ -65,6 +66,7 @@
6566
* @see EnvironmentPostProcessor
6667
* @since 1.1.0 (3.3.2 of MyBatis-Plus)
6768
*/
69+
@Deprecated(forRemoval = true)
6870
public class PropertyGuard implements EnvironmentPostProcessor {
6971

7072
private final static Logger log = LoggerFactory.getLogger(PropertyGuard.class);
@@ -99,7 +101,11 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp
99101
for (var name : source.getPropertyNames()) {
100102
if (source.getProperty(name) instanceof String str) {
101103
if (str.startsWith("%s:".formatted(PREFIX))) {
102-
map.put(name, AesUtil.decrypt(str.substring(3), encryptionKey));
104+
try {
105+
map.put(name, AesUtil.decrypt(str.substring(3), encryptionKey));
106+
} catch (GeneralSecurityException e) {
107+
log.error("Unable to decrypt param {}", name);
108+
}
103109
}
104110
}
105111
}

0 commit comments

Comments
 (0)