Spring Boot 配置文件有哪些类型?它们有什么区别?
What types of Spring Boot config files are there, and how do they differ?
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
分类: Backend
标签: Spring Boot, YAML, Properties
参考答案摘要
答案 配置文件有 .properties 格式和 .yml 格式,它们主要的区别是书法风格不同。 .properties 配置如下: spring. RabbitMQ. port=5672 .yml 配置如下: spring: RabbitMQ: port: 5672 .yml 格式不支持 @PropertySource 注解导入。
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。