获取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"); }

 

posted @ 2015-06-01 13:53  samu  阅读(2518)  评论(0编辑  收藏  举报