SpringBoot JWT securityConfig 오류 (application.yml)

Woolly·2023년 8월 16일
0
post-thumbnail

프로젝트에 JWT을 적용하려고 했는데 계속 securityConfig 파일에서

"Error creating bean with name 'jwtTokenProvider': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jwt.secret.key' in value "${jwt.secret.key}""

이 에러가 나서 애를 먹었다.

뭐가 문제일까 계속 살펴보고 찾아보던 와중에

docker-compose 세팅을 하면서 application.yml에 profile 설정한 것이 문제임을 알아냈다.

on-profile의 dev를 삭제하고 다시 실행하니 오류 없이 실행되는 것을 확인할 수 있었다.

참고 : https://shanepark.tistory.com/351

profile
Ad Astra

0개의 댓글