spring boot 中配置文件的读取和多环境配置

配置文件中若是配置项不少的话,最好是写一个或者多个配置对象来读取配置。java 建议使用yml格式来写配置文件。这种格式更加面向对象一点。好比web person: name: zhangsan age: 45 server: port: 8888 context-path: /xxx cupSize: D 注意,冒号后面有个空格,这个是yml格式的要求。spring @Com
相关文章
相关标签/搜索