0
点赞
收藏
分享

微信扫一扫

yaml

愚鱼看书说故事 2022-02-18 阅读 52


yaml

environments:
dev:
url: https://dev.example.com
name: Developer Setup
prod:
url: https://another.example.com
name: My Cool App


properties:

environments.dev.url=https://dev.example.com
environments.dev.name=Developer Setup
environments.prod.url=https://another.example.com
environments.prod.name=My Cool App


yaml数组

my:
servers:
- dev.example.com
- another.example.com

properties数组

my.servers[0]=dev.example.com
my.servers[1]=another.example.com


java配置对象

@ConfigurationProperties(prefix="my")
public class Config {

private List<String> servers = new ArrayList<String>();

public List<String> getServers() {
return this.servers;
}
}

 

举报

相关推荐

0 条评论