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

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; 
 
    ... 
} 
主站蜘蛛池模板: 徐闻县| 清水河县| 自治县| 靖江市| 高淳县| 肥西县| 建湖县| 宁波市| 银川市| 海口市| 武宁县| 长治市| 双江| 大新县| 正镶白旗| 巩留县| 莆田市| 拜城县| 进贤县| 谢通门县| 来宾市| 广东省| 页游| 襄城县| 南郑县| 宣威市| 莫力| 襄垣县| 彰化县| 永康市| 泗水县| 双峰县| 云南省| 景洪市| 略阳县| 囊谦县| 松桃| 阳城县| 吐鲁番市| 黄大仙区| 西平县|