SpringBoot中application.yml配置文件的写法

  import org.springframework.boot.autoconfigure.SpringBootApplication;

  import org.springframework.boot.builder.SpringApplicationBuilder;

  @SpringBootApplication

  public class TestApplication {

  public static void main(String[] args) {

  SpringApplicationBuilder builder = new SpringApplicationBuilder(TestApplication.class);

  builder.application().setAdditionalProfiles("dev");

  builder.run(args);

  }

  }