springboot config

Author doingdone

说明

spingboot 可以添加自定义的配置,需要在application.yml文件中添加,并设置对应的Config类解析。
当然也可以指定配置文件,及相关的解析前缀。

demo

application.yml

server:
servlet:
context-path: /patient
port: 8080
spring:
thymeleaf:
encoding: UTF-8
mode: HTML

Config.java

请我吃糖~
打赏二维码