0

I have a Spring Boot application
I have a external library (written by me, also using Spring parent) as dependency

In application.yml (in application, not in library) I have property example

In library, I have a class with code like this:

@Value("${example}")
private String example;

The value for this field is null, but when I'm calling for Environmet this value is accessible. Any hint what should I do to get value by using @Value?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Fangir
  • 131
  • 6
  • 16

1 Answers1

1

May be you forget add @Component annotation your class