Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SnakeYaml 解析 yaml 文件,是否有忽略 yaml 文件中的属性?
我找到了 :)
Representer representer = new Representer(); representer.getPropertyUtils().setSkipMissingProperties(true); Yaml yaml = new Yaml(new Constructor(MyClass.class),representer);