[英]Yaml configuration list of objects to properties file
I'm trying to convert the following yaml configuration for SAML2 security to and equivalent properties file.我正在尝试将以下用于 SAML2 安全性的 yaml 配置转换为等效的属性文件。
spring:
security:
saml2:
relyingparty:
registration:
xyz:
signing:
credentials:
- certificate-location: "classpath:saml/xyz.pem"
private-key-location: "classpath:saml/xyz.key"
identityprovider:
entity-id: xyz
sso-url: xyz.com
verification:
credentials:
- certificate-location: "classpath:saml/xyz.pem"
It contains lists and it's not obvious how to convert it to properties.它包含列表,如何将其转换为属性并不明显。 I couldn't find much online about it.我在网上找不到太多关于它的信息。
This portion of the config file configures the following class:配置文件的这一部分配置了以下类:
org.springframework.boot.autoconfigure.security.saml2.Saml2RelyingPartyProperties
From the spring-boot-autoconfigure-2.2.5.RELEASE.jar.来自 spring-boot-autoconfigure-2.2.5.RELEASE.jar。
Try this out.试试这个。 This should work这应该工作
spring.security.saml2.relyingparty.registration.xyz.signing.credentials[0].certificate-location=classpath:saml/xyz.pem
spring.security.saml2.relyingparty.registration.xyz.signing.credentials[0].private-key-location=classpath:saml/xyz.key
spring.security.saml2.relyingparty.registration.xyz.identityprovider.entity-id=xyz
spring.security.saml2.relyingparty.registration.xyz.identityprovider.sso-url=xyz.com
spring.security.saml2.relyingparty.registration.xyz.identityprovider.verification.credentials[0].certificate-location=classpath:saml/xyz.pem
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.