yml文件配置数组样例:
arrays:
key:
- Abc
- CBD
对应的java为定义
@Configuration
@RefreshScope
@ConfigurationProperties(prefix = "arrays")
public class IgnoreWhites {
/**
* 放行白名单配置,网关不校验此处的白名单
*/
private List<String> key = new ArrayList<>();
public List<String> getKey()
{
return key;
}
public void setKey(List<String> key)
{
this.key = key;
}
}