官术网_书友最值得收藏!

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; 
 
    ... 
} 
主站蜘蛛池模板: 盘山县| 金秀| 乌拉特后旗| 怀来县| 大石桥市| 七台河市| 长治市| 大庆市| 宁德市| 江西省| 杨浦区| 巴东县| 嘉定区| 吉水县| 梁河县| 新沂市| 海口市| 珲春市| 云龙县| 自贡市| 新绛县| 文成县| 溧阳市| 雅江县| 洪江市| 蒙山县| 昭通市| 南平市| 霍林郭勒市| 额尔古纳市| 开阳县| 荆门市| 新野县| 南投市| 襄樊市| 东乡| 崇阳县| 秀山| 紫云| 彩票| 丰原市|