-
Field jwtUtil in '######' required a bean of type '#####' that could not be found.JAVA 2021. 8. 29. 15:40
他のPKGにあるBeanオブジェクトを参照しようとしたら以下のようなエラーが発生してしまった。
Field jwtUtil in '######' required a bean of type '#####' that could not be found.
エラーの理由は他PKGnoBeanクラスはComponent-Scanの範囲に含まれていないから!
対策としては@ComponentScanを使うことと
参照する側のconfigクラスにBeanを設定することがある。
'JAVA' 카테고리의 다른 글
BasicAuthenticationFilter (0) 2021.09.28 Authorizationとは (0) 2021.09.15 JPA (0) 2021.08.22 @ControllerAdvice (0) 2021.08.22 java.lang.IllegalStateException: Found multiple @SpringBootConfiguration annotated classes エラー (0) 2021.08.15