<aside> 1️⃣ yaml vs properties
</aside>
.properties
파일과 .yaml
파일을 사용한다. 이 두 형식은 각각 장단점이 있으며, 사용자의 선호나 특정 상황에 따라 선택할 수 있다.<aside> 2️⃣ properties
</aside>
.properties
파일은 전통적으로 자바에서 사용하는 설정 파일 형식이다.키-값
쌍으로 이루어져 있으며, 각 줄에 하나의 속성을 정의한다.server.port=8080
spring.datasource.url=jdbc:mysql://localhost/test
spring.datasource.username=dbuser
spring.datasource.password=dbpass
.
)을 사용하여 속성 이름을 길게 만들어야 한다.<aside> 3️⃣ .yaml
</aside>
.yaml
파일은 YAML Ain't Markup Language의 약자로, 데이터 직렬화 형식 중 하나이다.server:
port: 8080
spring:
datasource:
url: jdbc:mysql://localhost/test
username: dbuser
password: dbpass
.properties
파일보다 복잡하며, 들여쓰기에 따라 의미가 달라진다.<aside> 4️⃣ 혹시 속도나 성능의 차이가 있을까?
</aside>
.properties
파일과 .yaml
파일 사이에는 속도 차이가 있을 수 있다. 이는 YAML 파싱이 좀 더 복잡한 구조를 가지고 있기 때문이다.