- Developing Middleware in Java EE 8
- Abdalla Mahmoud
- 73字
- 2021-07-23 19:24:34
Direct field injection
Direct field injection is almost the easiest and most common mechanism for injecting CDI beans. By direct field injection, we mean that we define the injection point as an instance variable within another bean, then we use the @Inject annotation to request dependency injection. We have already used this mechanism in previous examples, so just to recall its code:
@Dependent public class AnotherPojo { @Inject private MyPojo myPojo; ... }
推薦閱讀
- 算法精粹:經典計算機科學問題的Java實現
- C語言程序設計教程(第2版)
- Unity Game Development Scripting
- Getting Started with NativeScript
- 飛槳PaddlePaddle深度學習實戰
- 第一行代碼 C語言(視頻講解版)
- Mastering Data Mining with Python:Find patterns hidden in your data
- Java Fundamentals
- Python Data Science Cookbook
- Python機器學習算法與應用
- SQL Server 入門很輕松(微課超值版)
- Arduino Wearable Projects
- Python趣味創意編程
- Unreal Engine Game Development Cookbook
- Mastering React Test:Driven Development