application.properties, application.yml

application.properties, application.yml

application.properties, application.yml

properties : a.b.c 구조, key=value

yml : 들여쓰기, key : value

애플리케이션 실행 설정값을 가지는 파일

yml file

spring: datasource: driverClassName: com.mysql.cj.jdbc.Driver jpa: hibernate.ddl-auto: update

properties file

spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.jpa.hibernate.ddl-auto=update

e.g.

// 포트 설정 server.port=1111 // db 설정 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.datasource.url=jdbc:mariadb://192.168.0.7:3306/test spring.datasource.username=user spring.datasource.password=password // jpa 설정 spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.format_sql=true spring.jpa.show-sql=true // session 설정 spring.session.store-type= // 다른 properties 파일 설정 가져오기 spring.profiles.include=oauth // application-oauth.properties 설정 포함

from http://akatapata.tistory.com/57 by ccl(A) rewrite - 2021-12-25 04:28:10