import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; import java.util.LinkedHashMap; import java.util.Map; /** * 存储配置 * <p><b> -------------------------- </b></p> * */ @Configuration @ConfigurationProperties(prefix = "storage") @Data public class StorageProperties { /** * 当前使用的存储类型 * */ private StorageType type; /** * 第三方 oss 配置信息 * */ private Map<StorageType, OssProperties2> ossConfig = new LinkedHashMap<>(); @NestedConfigurationProperty private Admin info; }
标签:自定义,spring,boot,private,import,LinkedHashMap From: https://www.cnblogs.com/whm-blog/p/16710672.html