无需Spring即可读取和映射属性文件

问题描述

我有一个property.yaml文件:

table:
  map:
    0:
      - 1
      - 2
      - 3
    1:
      - 1
      - 2
      - 3
      - 4
    2:
      - 1
      - 2
      - 3
    3:
      - 1
      - 2
      - 3

我想将其映射到Map<Integer,List<Integer>> map。使用@ConfigurationProperties("table")很容易。但是我必须在没有Spring的情况下进行操作。有想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)