myProps:
  varmaplist:
      key11:
        - t1
        - t2
        - t3
      key22:
        - t11
        - t22
        - t33
  list:
    - topic1
    - topic2
    - topic3
  maps: {key1: 'value1', key2: 'value2'}




@Component
@Data
@Configuration
@PropertySource(value = {"classpath:/bootstrap.yml"}, encoding = "utf-8")
@ConfigurationProperties(prefix = "myProps")
public class MyProps {

    private List<String> list;


    private Map<String,String> maps;

    private Map<String,List<String>> varmaplist;
}
 

转载自https://www.cnblogs.com/neaos/p/10790528.html

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2022-03-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2023-02-24
  • 2021-05-25
  • 2021-10-14
相关资源
相似解决方案