通过配置,可以写自定义yml配置
支持 yml 文件工厂类
/**
* 版权:Taylor
* 描述: @PropertySource 支持 yml 文件工厂类
* 创建时间:2020年05月15日
*/
package com.taylor.test.service.config;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.support.DefaultPropertySourceFactory;
import org.springframework.core.io.support.EncodedResource;
import java.io.*;
import java.util.Properties;
/**
* @author Taylor
* @PropertySource 支持 yml 文件工厂类
* @date 2020年05月15日
*/
public class ResourceFactory