Categories
java properties-file spring-boot

How to access a value defined in the application.properties file in Spring Boot

I want to access values provided in application.properties, e.g.:

logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR
logging.file=${HOME}/application.log
userBucket.path=${HOME}/bucket

I want to access userBucket.path in my main program in a Spring Boot application.