- 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
推薦閱讀
- Instant Typeahead.js
- FFmpeg入門詳解:音視頻原理及應(yīng)用
- SQL基礎(chǔ)教程(視頻教學(xué)版)
- Learning Concurrent Programming in Scala
- C語言程序設(shè)計
- RESTful Java Web Services(Second Edition)
- 移動互聯(lián)網(wǎng)軟件開發(fā)實(shí)驗(yàn)指導(dǎo)
- Processing創(chuàng)意編程指南
- ArcGIS for Desktop Cookbook
- Django 5企業(yè)級Web應(yīng)用開發(fā)實(shí)戰(zhàn)(視頻教學(xué)版)
- PrimeFaces Blueprints
- 嵌入式Linux C語言程序設(shè)計基礎(chǔ)教程
- DB2SQL性能調(diào)優(yōu)秘笈
- 超好玩的Scratch 3.5少兒編程
- Software-Defined Networking with OpenFlow(Second Edition)