ENC加密
ENC加密 username: ${MYSQL_USER:ENC(YM6DAVWjLDr6J6bWqOpcLaFwProvLOVT)} 加密 http://192.168.xxx:xx/xx/enc/encrypt?input=xmh YM6DAVWjLDr6J6bWqOpcLaFwProvLOVT 解密 http://192.168.144.xxx:xxx/xx/enc/decrypt?input=YM6DAVWjLDr6J6bWqOpcLaFwProvLOVT <artifactId>jasypt-spring-boot-starter</artifactId> <groupId>com.github.ulisesbocchio</groupId> <version>3.0.4</version> @Autowired private StringEncryptor stringEncryptor; @Operation(summary = "加密", description = "ENC()为固定格式") @GetMapping("/encrypt") public String encrypt(String input){ return stringEncryptor.encrypt(input); } @Operation(summary = "解密") @GetMapping("/decrypt") public String decrypt(String input){ return stringEncryptor.decrypt(input); }