gpt4 book ai didi

org.springframework.beans.factory.config.YamlProcessor.createYaml()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 15:41:31 30 4
gpt4 key购买 nike

本文整理了Java中org.springframework.beans.factory.config.YamlProcessor.createYaml()方法的一些代码示例,展示了YamlProcessor.createYaml()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlProcessor.createYaml()方法的具体详情如下:
包路径:org.springframework.beans.factory.config.YamlProcessor
类名称:YamlProcessor
方法名:createYaml

YamlProcessor.createYaml介绍

[英]Create the Yaml instance to use.

The default implementation sets the "allowDuplicateKeys" flag to false, enabling built-in duplicate key handling in SnakeYAML 1.18+.
[中]创建要使用的Yaml实例。
默认实现将“allowDuplicateKeys”标志设置为false,从而在SnakeYAML 1.18+中启用内置的重复密钥处理。

代码示例

代码示例来源:origin: spring-projects/spring-framework

/**
 * Provide an opportunity for subclasses to process the Yaml parsed from the supplied
 * resources. Each resource is parsed in turn and the documents inside checked against
 * the {@link #setDocumentMatchers(DocumentMatcher...) matchers}. If a document
 * matches it is passed into the callback, along with its representation as Properties.
 * Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all of the
 * documents will be parsed.
 * @param callback a callback to delegate to once matching documents are found
 * @see #createYaml()
 */
protected void process(MatchCallback callback) {
  Yaml yaml = createYaml();
  for (Resource resource : this.resources) {
    boolean found = process(callback, yaml, resource);
    if (this.resolutionMethod == ResolutionMethod.FIRST_FOUND && found) {
      return;
    }
  }
}

代码示例来源:origin: org.springframework/spring-beans

/**
 * Provide an opportunity for subclasses to process the Yaml parsed from the supplied
 * resources. Each resource is parsed in turn and the documents inside checked against
 * the {@link #setDocumentMatchers(DocumentMatcher...) matchers}. If a document
 * matches it is passed into the callback, along with its representation as Properties.
 * Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all of the
 * documents will be parsed.
 * @param callback a callback to delegate to once matching documents are found
 * @see #createYaml()
 */
protected void process(MatchCallback callback) {
  Yaml yaml = createYaml();
  for (Resource resource : this.resources) {
    boolean found = process(callback, yaml, resource);
    if (this.resolutionMethod == ResolutionMethod.FIRST_FOUND && found) {
      return;
    }
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Provide an opportunity for subclasses to process the Yaml parsed from the supplied
 * resources. Each resource is parsed in turn and the documents inside checked against
 * the {@link #setDocumentMatchers(DocumentMatcher...) matchers}. If a document
 * matches it is passed into the callback, along with its representation as Properties.
 * Depending on the {@link #setResolutionMethod(ResolutionMethod)} not all of the
 * documents will be parsed.
 * @param callback a callback to delegate to once matching documents are found
 * @see #createYaml()
 */
protected void process(MatchCallback callback) {
  Yaml yaml = createYaml();
  for (Resource resource : this.resources) {
    boolean found = process(callback, yaml, resource);
    if (this.resolutionMethod == ResolutionMethod.FIRST_FOUND && found) {
      return;
    }
  }
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com