JSF 2 - @ManagedBean not detected

前端 未结 2 1060
广开言路
广开言路 2020-12-11 05:31

I have a ParentBean class which has the @ManagedBean annotation. If I subclass this class, the ChildBean does not inherit the @ManagedBean annotati

2条回答
  •  情歌与酒
    2020-12-11 06:02

    After reading this question and reading a little bit the source code from Mojarra (see question), I think Mojarra may not actually scan thoroughly the classes (for loading performance).

    So my guess is that for one given class, the Mojarra AnnotationScanner stays on this class and it doesn't scan the hierarchy of this same class.

    This is why my ChildBean is not recognized as a ManagedBean.

提交回复
热议问题