강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

Spring Boot JWT Tutorial

Security settings, Data settings

data.sql이 실행이 안되는것 같은데...

Written on

·

1.7K

2

서버를 실행할때 데이터 insert가 안되는 것 같은데 따로 설정이 필요한건가요?....

spring-bootjwt

Answer 4

2

Spring 버전 2.5이상부터 초기화 순서가 변경되었습니다.

해당 커뮤니티에 다른분이 2.5이상 관련된 글 있으니 참조하시면 될 거 같습니다.

추가적으로 application.yml에 'spring:init:mode:always' 설정하시면 될 거에요!

silvernine님의 프로필 이미지
silvernine
Instructor

NG Kim님 감사합니다 :)

1

다음과 같이 추가 하면 됩니다. 위의 블로그 참고

application.yaml

jpa:

  defer-datasource-initialization: true

1

여기도 설명이 잘되어있는거 같네요! 

오류해결법

1

silvernine님의 프로필 이미지
silvernine
Instructor

안녕하세요 수현님 답변이 늦어 죄송합니다.

만약 data.sql 이슈가 있는 Spring Boot 버전을 사용하시는 상태라면 아래 릴리즈 노트를 참고하시면 될 것 같습니다. 

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Release-Notes

추가로 관련 내용의 블로그 주소를 첨부합니다.

https://zzang9ha.tistory.com/371

말씀주신걸로 설정해도 같은 오류가 뜨는 이유는 뭘까요 ㅠㅠ

위 블로그 글로 해결되었습니다. 

No author

This post's author information has been deleted.

Ask a question