0

I'm trying to get acess costume environment variable that I just added to Elastic beanstalk. The way i added the variable is only in Software Configuration.

The variable is FLAG and the value is 'true'. In my code I'm doing this:

@Value("${FLAG}")
private Boolean flag1= true;

but I'm getting this error:

java.lang.IllegalArgumentException: Could not resolve placeholder 'FLAG' in string value "${FLAG}"

I'm working with java spring and AWS elastic beanstalk

Thank you

2 Answers2

0

You probably have two PropertySourcesPlaceholderConfigurer instances.

Check this answer : https://stackoverflow.com/a/20245272/8800147

br.julien
  • 3,420
  • 2
  • 23
  • 44
0

Solution: Maybe it will sound weird and not make sense, but it works only after i turn off the Intellij and open again