카테고리 없음

Data source 설정

eyoadgkn 2024. 6. 10. 18:26
Spring Boot에서 데이터 소스 설정
application.properties 또는 application.yml 파일에 데이터베이스 연결 정보 설정
# application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.datasource.username=myuser
spring.datasource.password=mypassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

 

JPA 설정 (application.properties나 application.yml에 설정.)
# application.properties
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

계속 추가예정