Spring Config Server加密“=”符号的问题

时间:2017-02-08 06:19:23

标签: spring encryption spring-boot configserver

使用具有特殊字符的值通过配置服务器加密时,是否有人遇到问题?

目前我正在这样做

curl http://localhost:8888/configser/config/encrypt -d eF345edo=

我也提到了https://github.com/spring-cloud/spring-cloud-config/issues/620,并尝试如下

curl http://localhost:8888/configser/config/encrypt --data-urlencode eF345edo=

但加密'='符号仍然没有成功。

提前致谢

1 个答案:

答案 0 :(得分:7)

最后,我从spring cloud config的官方文档中得到了解决方法:(有关特殊字符,请参阅TIP区域) http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_encryption_and_decryption

curl命令获取最终结果:

curl -H "Content-Type: text/plain" http://localhost:8888/configser/config/encrypt -d eF345edo=

感谢@Bond - Java Bond

感谢大家的帮助。