Ming

tianshiming5@outlook.com

BeiJing, China
  • Home
  • Archives
  • Categories
  • Tags

Categories

Tags

  • activiti1
  • ai2
  • algorithm1
  • angular2
  • api3
  • architecture8
  • arthas2
  • cdh4
  • db23
  • design-pattern15
  • diagram1
  • docker11
  • druid2
  • ehcache1
  • eureka1
  • feign1
  • git9
  • gradle2
  • grafana1
  • h24
  • hadoop4
  • hive6
  • idea4
  • jackson5
  • java50
  • jenkins6
  • jooq3
  • js1
  • k8s2
  • kerberos3
  • linux19
  • lombok1
  • mac8
  • markdown1
  • maven22
  • minio2
  • model1
  • mongodb2
  • mq2
  • mybatis7
  • mysql24
  • nexus1
  • nginx3
  • nlp1
  • nodejs2
  • oracle4
  • parquet1
  • postgresql1
  • procotol1
  • protocol5
  • python1
  • redis6
  • regexp5
  • scala4
  • seata2
  • smart-home2
  • spark6
  • spring39
  • spring-cloud1
  • swift16
  • test9
  • transactional2
  • windows8
  • yapi2

Recent Posts

  • Grafana how to handle variable when it is ALL(pg)

    2024-08-01

  • spark auto infer col(all string) types

    2024-07-29

  • spark many columns to rows

    2024-07-29

  • Switch virtual keyboard in swiftui simulator

    2024-04-21

  • Linux SMB2 share

    2024-04-05

Catalogue

@Value默认值

  2018-11-15   spring  Comments Word Count: 48words Read Count: 1minutes
//代表默认值为空字符串
@Value("${spring.application.name:}")
private String name;

//代表默认值为字符串dev
@Value("${spring.profiles.active:dev}")
private String profileActive;

//默认值为true
@Value("${project.auth.isAdmin:true}")
private boolean isAdmin;
  • Permalink: https://blog.tianshiming.com/2018/11/value-default/
  • License:CC BY 4.0 CN

Mingtianshiming5@outlook.com

Finally
  •   Older
  • Newer  
  • [ Catalogue ]
©2015 - 2024