zoukankan      html  css  js  c++  java
  • Springboot----属性配置(properties和yaml)

    1.application.properties 文件

      @Value    读取 属性

    2.自定义properties文件读取:

    @PropertySource("classpath:xxx.properties") 

    @Value("${}")

    3.application.yaml文件

    @ConfigurationProperties(prefix="")

    4.@PropertySource()+@ConfigurationProperties()  properties文件可以 yml不支持 @PropertySource(没用过不知道行不行)

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <version>2.2.5.RELEASE</version>
    </dependency>
  • 相关阅读:
    AC自动机模板
    2013 ACM/ICPC Asia Regional Changsha Online–C (模拟)
    Codeforces126B
    Codeforces182D
    Codeforces149E
    POJ3080
    POJ2752
    HDU4745
    HDU4737
    POJ1226
  • 原文地址:https://www.cnblogs.com/chencn/p/12369717.html
Copyright © 2011-2022 走看看