I have been given a task to assign a property from .properties
file to a non Spring bean class using @Value
annotation. To do this, I created a method on a @Component
annotated class and set the property into it, then called that method from the non Spring bean class. I thought this would work, however, still showing as null.
I was told this is because the @Component
annotated class I used is not spring loaded. Question, how can I tell if a class is Spring loaded bean? I have been searching on google but can't find anything helpful aside from examples with @Component
or @Configuration
annotations. Thanks.