Is it possible to do something like that?
@Value("${xxx.hostname}")
private String hostname;
Is it also possible to get any other System Environment Property like that?
Spring Boot automatically allow you to take environment variable.
You can just do @Value("${HOSTNAME}")
(if HOSTNAME is defined ofc)
You can also use your application.properties
to have something like :
xxx.hostname = ${HOSTNAME}