- Developing Middleware in Java EE 8
- Abdalla Mahmoud
- 58字
- 2021-07-23 19:24:33
Injecting beans
As you saw in previous examples, the @Inject annotation allows us to inject a bean as a field in another bean during its instantiation. However, the use of @Inject is not limited to fields only, as there are three valid mechanisms for injecting CDI beans:
- Direct field injection
- Bean constructor parameter injection
- Initializer method parameter injection
推薦閱讀
- C++ Primer習題集(第5版)
- 嵌入式軟件系統測試:基于形式化方法的自動化測試解決方案
- 簡單高效LATEX
- 編程珠璣(續)
- PHP+MySQL網站開發技術項目式教程(第2版)
- JavaScript by Example
- INSTANT OpenNMS Starter
- Visual C++數字圖像處理技術詳解
- HTML5+CSS3網站設計基礎教程
- C語言程序設計上機指導與習題解答(第2版)
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- 現代C:概念剖析和編程實踐
- NGUI for Unity
- HTML5移動Web開發
- Building UIs with Wijmo