Replies: 4 comments 14 replies
-
Beta Was this translation helpful? Give feedback.
-
Hmm, this should work as you expect. However, your sample code in this issue isn't complete. |
Beta Was this translation helpful? Give feedback.
-
Matej is right. There must be something else. Isn't there another bean that also extends |
Beta Was this translation helpful? Give feedback.
-
Not really. The way it works is you first need to discover all classes that have bean defining annotation and for those classes you traverse their hierarchy (when/where applicable) to discover additional inherited annotations. At least this is what spec says - it's basically a type discovery that you perform based on a set of bean defining annotations and that's your entry point for any further work on those types (plus synthetically added types). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was under the impression that
@ApplicationScoped
on an abstract base should be inherited by a subclass, given that@ApplicationScoped
is annotated with@Inherited
.But I just got this strange error with
@InjectMock
:results in:
When I add
@ApplicationScoped
toSub
it works as expected.I do understand why
@Singleton
prevents mocking, but why isn't the bean@ApplicationScoped
?Am I doing something wrong?
Edit: abstract removed from Sub
Beta Was this translation helpful? Give feedback.
All reactions