I have a spring boot REST API app. I am using environment variables in application.properties file. Some settings are as shown below:
logging.level.springframework.web=${WEB_LOG_LEVEL}
logging.level.org.hibernate=${HIBERNATE_LOG_LEVEL}
In my unit test, I use annocation @TestPropertySource("classpath:application-test.properties"). However, when I run mvn clean install, build fails because of unit test failure. I provided the error log. When I ran in IDE, I can provide those environment vairables. Any suggestions on how to pass them in mvn clean install? Or any other approaches you would recommend? Thanks much in advance!
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'logging.level.springframework.web' to org.springframework.boot.logging.LogLevel:
Property: logging.level.springframework.web
Value: ${WEB_LOG_LEVEL}
Origin: class path resource [application.properties] - 44:35
Reason: failed to convert java.lang.String to org.springframework.boot.logging.LogLevel (caused by java.lang.IllegalArgumentException: No enum constant org.springframework.boot.logging.LogLevel.${WEB_LOG_LEVEL})
Action:
Update your application's configuration. The following values are valid:
DEBUG
ERROR
FATAL
INFO
OFF
TRACE
WARN