在自定义配置中加入:

package com.cps.trans.route.configuration;

import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;

/**
 * @author max woods
 * @date 2018/8/27
 */

@Configuration
//@ImportResource(locations = {"classpath:config/channel.yml","classpath:config/cups.yml"})
public class CustomConfiguration {

    @Bean
    public static PropertySourcesPlaceholderConfigurer properties() {
        PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
        YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
        // 从classpath导入
        yaml.setResources(new ClassPathResource("/config/channel.yml"),
                new ClassPathResource("/config/cups.yml"));
        yaml.afterPropertiesSet();
        configurer.setProperties(yaml.getObject());
        return configurer;
    }
}

docker相关电子书

Docker全攻略 循序渐进学Docker 第一本Docker书 下载地址:https://maxwoods.ctfile.com/u/758954/30258828 相关

阅读全文

加密机体系

版权声明:转载或使用时请注明出处与作者。 https://blog.csdn.net/weixin_43177881/article/details/83034315 首发地址:简书-加密机体系 欢迎关注我的简书...

阅读全文

[Java]基于BC库的国密算法(SM2\SM3\SM4)的应用

https://github.com/ZZMarquis/gmhelper 相关

阅读全文

欢迎留言