Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
* <p>
* The generated UUID adheres strictly to the layout and variant bits of UUID version 7 as defined in the specification.
* </p>
*
* @implNote This class implements the {@link GuidCreator} interface, providing UUID instances as unique identifiers.
*/
public class SequentialUuidCreator implements GuidCreator<UUID> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
}
}
Expand Down