Help us understand the problem. What is going on with this article?

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

事象

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を使っている場合はそこも考慮して落ち着いて対応する。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした