域名非常简单好记,直接在地址栏里输入toyaml.com,链接地址:点我点我
---------------------------------这是静态地址:https://www.toyaml.com/index.html
yml,即yaml文本格式文件的后缀名,yaml可以用来替代properties,可读性更好一些。
目前spring boot的配置文件已经同时支持properties和yaml格式。
properties中的格式一般都可以转换为yaml格式。
如在properties中一段内容为:
server.port=8086
spring.thymeleaf.cache=false
spring.thymeleaf.mode=LEGACYHTML5
spring.dubbo.application.name=list-web
spring.dubbo.registry.protocol=zookeeper
spring.dubbo.registry.address=192.168.152.134:2181
spring.dubbo.base-package=com.guigu.gmall
spring.dubbo.protocol.name=dubbo
spring.dubbo.consumer.timeout=10000
spring.dubbo.consumer.check=false
那么yaml格式则变为:
server:
port: 8086
spring:
dubbo:
application:
name: list-web
base-package: com.guigu.gmall
consumer:
check: false
timeout: 10000
protocol:
name: dubbo
registry:
address: 192.168.152.134:2181
protocol: zookeeper
thymeleaf:
cache: false
mode: LEGACYHTML5
注意冒号后边有个空格。
上边这个网站可以帮助我们快速将properties转换为方便阅读的yaml格式,或直接在springboot中作为配置文件使用:
虽然看起来比较简陋,但是核心功能还是很强悍的。