inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

윤창호님의 게시글

윤창호 윤창호

@changddao

수강평 작성수
2
평균평점
5.0

게시글 2

질문&답변

Spring Boot / MySql db연동

해결했습니다. 일단 properties의 경우 아래와 같이 jpa와 같이 설정을 해주어야 하고 제가 생각했을 때 MySql version이 8.xx로 넘어오면서 driver-class name이 com.mysql.cj.jdbc.Driver로 변경되었고 spring.datasource.url=jdbc:mysql://localhost:3306/hi-spring?useSSL=false&serverTimezone=Asia/Seoul spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username= spring.datasource.password= spring.jpa.show-sql=true spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.format_sql=true; Gradle에 dependecy 줄 때 꼭 mysql-connector를 8.xx 이상으로 build해야지 정상 작동하는 것 같습니다. 어떻게 보면 당연할 수도있지만 저도 굉장히 많은 시간이 걸렸고 혹시나 h2 database말고 MySql을 사용하시는 분 중 저처럼 헤메는 분이 있다면 참고하시면 좋겠습니다. 굉장히 오랜시간을 할애했거든요 ㅠㅠ

좋아요수
0
댓글수
2
조회수
2415