Class NacosJsonPropertySourceLoader

java.lang.Object
com.alibaba.cloud.nacos.parser.AbstractPropertySourceLoader
com.alibaba.cloud.nacos.parser.NacosJsonPropertySourceLoader
All Implemented Interfaces:
org.springframework.boot.env.PropertySourceLoader

public class NacosJsonPropertySourceLoader extends AbstractPropertySourceLoader
Author:
zkz
  • Constructor Details

    • NacosJsonPropertySourceLoader

      public NacosJsonPropertySourceLoader()
  • Method Details

    • getFileExtensions

      public String[] getFileExtensions()
      Returns the file extensions that the loader supports (excluding the '.').
      Returns:
      the file extensions
    • doLoad

      protected List<org.springframework.core.env.PropertySource<?>> doLoad(String name, org.springframework.core.io.Resource resource) throws IOException
      Load the resource into one or more property sources. Implementations may either return a list containing a single source, or in the case of a multi-document format such as yaml a source for each document in the resource.
      Specified by:
      doLoad in class AbstractPropertySourceLoader
      Parameters:
      name - the root name of the property source. If multiple documents are loaded an additional suffix should be added to the name for each source loaded.
      resource - the resource to load
      Returns:
      a list property sources
      Throws:
      IOException - if the source cannot be loaded
    • reloadMap

      protected Map<String,Object> reloadMap(Map<String,Object> map)
      Reload the key ending in `value` if need.