获取Spring-boot系统环境变量方法

    public static ConfigurableApplicationContext  context = null;

    public static void main( String[] args ) throws Exception
    {
        //1. start application
        context = SpringApplication.run( App.class, args );
       String selfUrl
=App.context.getEnvironment().getProperty("ta.selfcheck.url"); }
原文地址:https://www.cnblogs.com/feika/p/4543793.html