次のスニペットでは、@ManagedBean に特定の名前を付けると、userService と authenticationService は注入されません。しかし、名前なしで @ManagedBean のみを使用すると、インジェクションは正常に機能します。何か案が?
@Component
@ManagedBean(name="user") // the injection doesn't work
//@ManagedBean // the injection works
@SessionScoped
public class UserManagedBean implements Serializable {
// Spring User Service is injected...
@Autowired
UserService userService;
@Autowired
private AuthenticationService authenticationService;