2017-10-26 9 views
-2

私は常に@Autowiredの問題に直面しています。 @Autowiredアノテーションに関する詳細な知識を誰とでも共有することができます。例は認められるであろう。Spring Boot @Autowired

ありがとうございます。

+0

https://stackoverflow.com/a/3153617/4423636 –

+3

[Spring @Autowired usageの理解](https://stackoverflow.com/questions/19414734/understanding-spring- autowired-usage) –

答えて

0
 public class ArticleController { 
     @Autowired 
     private IArticleService articleService 
     } 

オートワイヤリングを行う必要がありませんcontroller.WeにIArticleServiceの上記の例インスタンスのXML構成 を使用して、プロパティタグとコンストラクタ、引数タグをcollobrateする無必要はオートワイヤリングないとの依存関係を注入するimplcit方法でありますセッターやコンストラクタを使って明示的に注入する