PostConstruct Annotation Question #8798
Unanswered
GreihMurray
asked this question in
Q&A
Replies: 1 comment
-
a directly instantiated object is considered un-managed. When you use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can anyone help me understand why the PostConstruct annotation is meant to not execute if a bean is instantiated using new? For example, using "var bean = new Bean()" will not trigger the PostConstruct annotation but something like "@Inject Bean bean" will. What is the difference and why does only one trigger PostConstruct?
Beta Was this translation helpful? Give feedback.
All reactions