Framework | Library | Tool/Spring Core

Spring Properties 주요 설정

주정용 2020. 3. 30. 17:23
728x90

application.properties 주요 설정들


Datasource

spring.datasource.driver-class-name : DB 드라이버
spring.datasource.url : jdbc url
spring.datasource.username : DB 접근 계정
spring.datasource.password : DB 계정 비밀번호

JPA setting

spring.jpa.hibernate.ddl-auto :
DDL 모드. 실제 "hibernate.hbm2ddl.auto"속성.

spring.jpa.database-platform :
작동할 DB의 이름이며 기본적으로 자동 감지됩니다.
사용하는 DB에 맞게 방언을 설정합니다.

spring.jpa.generate-ddl :
시작시 스키마를 초기화 할지 여부.

spring.jpa.show-sql :
로그에 sql문을 찍습니다.

spring.jpa.properties.hibernate.show_sql :
작동하는 sql을 보여줍니다.

spring.jpa.properties.hibernate.format_sql :
sql을 예쁘게 보여줍니다.

spring.jpa.open-in-view

'Framework | Library | Tool > Spring Core' 카테고리의 다른 글

스프링의 AOP  (0) 2022.05.01
Spring Triangle : 스프링을 지탱하는 원리  (0) 2021.06.06