I am trying to execute the following Spring code using Android annotations:
@Autowired public initHandlerList(List<Handler> handlerList) {
I tried to use both the interface and the class.
Bean definition:
@EBean public AbstractHandler implements Handler {}
Attempt to enter:
@Bean public initHandlersList(List<AbstractHandler> handlersList) {
But the following error always occurred:
Error:(20, 5) error: org.androidannotations.annotations.Bean can only be used on an element annotated with @org.androidannotations.annotations.EBean
So, I think, since the list itself is not annotated with @EBean
, it cannot be used as a Bean ... to somehow implement this using Android annotations?
Thanks!
source share