有这样的application.yml:
foo.bar: '{cipher}aaa'
工作正常。
我只想使用加密值作为默认值。所以类似:
foo.bar: '${xyz:{cipher}aaa}'
但这不起作用,因为 {cipher}aaa
部分未被识别为加密。
我该如何解决这个问题?
最佳答案
{cipher}
位仅在属性的开头被识别。尝试设置
foo.bar.default: {cipher}aaa
foo.bar: '${xyz:${foo.bar.default}}'
关于java - Spring Cloud Config 加密属性作为默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62701065/