一品网
  • 首页

Spring Boot配置文件占位符


1、随机数

  ${random.value}、${random.int}、${random.long}

  ${random.int[10]}、${random.int[1024,65536]}

2、占位符获取之前配置的值

person.last-name=张三${random.value}}
person.age=${random.int}}
person.birth=2019-02-19
person.boss=false
person.maps.k1=v1
person.maps.k2=v2
person.lists=a,b,c
person.dog.name=${person.hello:hello}_dog
person.dog.age=18
springboot

相关


Java web开发:从零到 Run 一个现有的 Spring Boot 前后端分离项目(前端Vue)

Spring boot 扫描不到 mybatis 接口包

Spring Boot 2.x基础教程:使用MyBatis的XML配置方式

Spring Boot 2.x基础教程:工程结构推荐

Spring Boot 实现各种参数校验,写得太好了,建议收藏!

Spring Boot接口设计

Spring Boot Admin极简教程

Spring boot集成mongodb,MongoTemplate、MongoRepository开发CRUD

Spring Boot 2.0 WebFlux 教程 (一) | 入门篇

Spring Boot + MyBatis 多模块项目搭建教程

在 Spring Boot 中使用搜索引擎 Elasticsearch

spring boot 根据注解动态注入bean到spring容器中

标签

一品网 冀ICP备14022925号-6