properties와 yaml 질문
653
작성한 질문수 28
application.properties로 하면 오류가 뜨고 application.yaml로 하면 문제가 해결이 됩니다.. 뭐가 문제인지 모르겠습니다.
spring.output.ansi.enabled=always
# DB 설정
spring.datasource.url=jdbc:h2:tcp://localhost/~/capstone
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
# JPA 관련
spring.jpa.hibernate.ddl-auto=create-drop #애플리케이션을 시작할 때 데이터베이스를 초기화하고 다시 테이블 생성
# ddl-auto=none로 하면 데이터 보존
spring.jpa.properties.hibernate.format_sql=true #실행되는 query를 보여준다.
# JPA Log -> SQL 로거를 통해 출력, 바인딩 되는 파라미터 확인 2가지 가능하도록
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
# JPA Log
#spring.jpa.show-sql=true system.out은 안되야 하므로 이건 X
위가 application.properties이고
logging:
level:
org:
hibernate:
SQL: DEBUG
type:
descriptor:
sql:
BasicBinder: TRACE
spring:
datasource:
driver-class-name: org.h2.Driver
password:
url: jdbc:h2:tcp://localhost/~/capstone
username: sa
jpa:
hibernate:
ddl-auto: create-drop #??????? ??? ? ??????? ????? ?? ??? ??'
properties:
hibernate:
format_sql: true #???? query? ????.'
output:
ansi:
enabled: always위가 application.yaml로 실행했을 때 입니다.
어째서 yaml로 해야만 실행되는지 모르겠습니다. 모든 설정은 같은거 같은데 혹시 부트 3.0이라 그런 것인지 궁금합니다.
답변 1
강의 관련 외 질문입니다.
0
68
2
SpringBoot4 + Hibernate7 모듈 등록 방법 공유
0
92
1
BeanCreationException
0
91
3
Update 후 UpdateMemberResponse 매핑할 때
0
50
1
트랜잭션을 사용 안 할 때 커넥션은 언제 가져오나요?
0
101
2
페이징 + 검색조건 관련해서 질문드립니다.
0
70
1
Query Dsl Q파일 질문입니다.
0
84
1
루트 쿼리라는것은
0
60
1
메서드를 분리하는 기준
0
65
1
findAllWithMemberDelivery 메서드 질문드립니다.
0
111
3
연관관계 매핑을 안 쓸 경우, 사용해야 하는 전략
0
86
2
fetch join과 영속화와 OSIV의 관계
0
87
2
Distinct 사용 전 결과에 대한 의문
0
117
2
레포지토리 계층에서의 트랜잭션에 대한 의문
0
59
1
영속성 컨텍스트 생명주기의 신기한 부분이 있습니다.
0
78
2
dto 필드 속 엔티티 여부
0
60
1
뷰템플릿 사용 시
0
77
2
Result 클래스 관련 질문
0
56
1
@PostConstruct 프록시 관련 질문드립니다
0
86
1
DTO 대신 Form 사용은 안되나요?
0
138
1
OSIV ON 상태일 때
0
96
1
fetch join VS fetch join 페이징 궁금증
0
187
2
양방향 연관관계 알아보는 법?
0
106
1
16강 17강 간단 정리 이게 맞을까요 ?
0
166
2





