注释类型 JsonPropertySource

    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      java.lang.String after
      The relative order after specified PropertySource
      boolean autoRefreshed
      It indicates the property source is auto-refreshed when the configuration is changed.
      java.lang.String before
      The relative order before specified PropertySource
      java.lang.String encoding
      A specific character encoding for the given resources.
      boolean first
      Indicates current PropertySource is first order or not If specified , before() and after() will be ignored, or last order.
      boolean ignoreResourceNotFound
      Indicate if a failure to find a property resource should be ignored.
      java.lang.String name
      Indicate the name of this property source.
      java.lang.Class<? extends java.util.Comparator<org.springframework.core.io.Resource>> resourceComparator
      Indicate the resources to be sorted when value() specifies the resource location wildcards
      java.lang.String[] value
      Indicate the resource location(s) of the JSON file to be loaded.
    • 元素详细资料

      • name

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.String name
        Indicate the name of this property source.
        另请参阅:
        PropertySource.getName(), Resource.getDescription()
        默认值:
        ""
      • autoRefreshed

        @AliasFor(annotation=ResourcePropertySource.class)
        boolean autoRefreshed
        It indicates the property source is auto-refreshed when the configuration is changed.
        返回:
        default value is false
        默认值:
        false
      • first

        @AliasFor(annotation=ResourcePropertySource.class)
        boolean first
        Indicates current PropertySource is first order or not If specified , before() and after() will be ignored, or last order.
        返回:
        default value is false
        默认值:
        false
      • before

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.String before
        The relative order before specified PropertySource

        If not specified , current PropertySource will be added last.

        If first() specified , current attribute will be ignored.

        返回:
        the name of PropertySource, default value is the empty string
        默认值:
        ""
      • after

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.String after
        The relative order after specified PropertySource

        If not specified , current PropertySource will be added last.

        If first() specified , current attribute will be ignored.

        返回:
        the name of PropertySource, default value is the empty string
        默认值:
        ""
      • value

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.String[] value
        Indicate the resource location(s) of the JSON file to be loaded.

        For example, "classpath:/com/myco/app.json"

        Resource location wildcards (e.g. **/*.json) also are permitted;

        ${...} placeholders will be resolved against any/all property sources already registered with the Environment.

        Each location will be added to the enclosing Environment as its own property source, and in the order declared.

        默认值:
        {}
      • resourceComparator

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.Class<? extends java.util.Comparator<org.springframework.core.io.Resource>> resourceComparator
        Indicate the resources to be sorted when value() specifies the resource location wildcards

        For example, "classpath:/com/myco/*.json", suppose there are two resources named "a.json" and "b.json" where two instances of Resource will be resolved, they are the sources of PropertySource, thus it has to sort them to indicate the order of PropertySource that will be added to the enclosing Environment.

        Default is DefaultResourceComparator

        另请参阅:
        DefaultResourceComparator
        默认值:
        io.microsphere.spring.config.env.support.DefaultResourceComparator.class
      • ignoreResourceNotFound

        @AliasFor(annotation=ResourcePropertySource.class)
        boolean ignoreResourceNotFound
        Indicate if a failure to find a property resource should be ignored.

        true is appropriate if the JSON file is completely optional.

        Default is false.

        默认值:
        false
      • encoding

        @AliasFor(annotation=ResourcePropertySource.class)
        java.lang.String encoding
        A specific character encoding for the given resources.

        Default is "UTF-8"

        默认值:
        "UTF-8"