亚洲精品亚洲人成在线观看麻豆,在线欧美视频一区,亚洲国产精品一区二区动图,色综合久久丁香婷婷

              當(dāng)前位置:首頁 > IT技術(shù) > 移動(dòng)平臺(tái) > 正文

              Java SpringBoot手動(dòng)加載指定application.properties
              2021-09-08 11:42:37

              封裝方法

              public class Application {
                  public static void main(String[] args) throws IOException {
                      FileInputStream inputStream = new FileInputStream(new File(System.getProperty("user.dir")) + "\config\application.properties");
                      Properties properties = new Properties();
                      properties.load(inputStream);
                      inputStream.close();
                      SpringApplication application = new SpringApplicationBuilder(Application.class).build();
                      application.setDefaultProperties(properties);
                      application.run(args);
                  }
              }
              

              本文摘自 :https://www.cnblogs.com/

              開通會(huì)員,享受整站包年服務(wù)立即開通 >