LoginSignup
3
1

More than 3 years have passed since last update.

IntelliJ x Kotlin x SpringBoot Could not autowire. No beans of 'xxx' type found.

Posted at

事象

IntelliJ x SpringBoot x Kotolin で、autowiredを使用とすると以下エラーがでた。

Could not autowire. No beans of 'xxx' type found.

画面キャプチャ
image.png

対応

  • IntelliJを最新にしてみたけど変わらなかった
  • エラーは出ているが問題なく起動できるので放置でも良さそう
  • エラーが気になる場合は、以下でエラーではなくWarning表示するように切り替える。

Preference > Inspections > Spring > Spring Core > Code > Autowiring for Bean Class
image.png

まとめ

IDEは便利だけど、ライブラリに対応できてないこともある。
コードだけに着目するのではなく、IDEを使っている場合はそこも考慮して落ち着いて対応する。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1