- 问题1:
The encryption algorithm is not strong enough
将配置参数放到bootstrap.properties或yml文件中
encrypt.key=configkey
- 问题2:
访问 Config对称加密参数访问:/encrypt 端点需要登录?
Spring-Boot2.xx(Spring-security5.x) security.basic.enabled废弃deprecated
直接从pom文件中移除Spring Security依赖。
使用curl 或者 postman访问 /encrypt 加密 /decrypt 解密
例如:curl http://localhost:port/encrypt -d xxx
curl http://localhost:port/decrypt -d xxx
本文探讨了在Spring Boot应用中如何有效管理加密参数,包括使用bootstrap.properties或yml文件存储配置参数,以及如何在不使用Spring Security的情况下访问加密参数。文章还提供了使用curl或postman访问/encrypt和/decrypt端点进行加密和解密操作的示例。
167万+

被折叠的 条评论
为什么被折叠?



