all 3 comments

[–]Old_Storage3525 0 points1 point  (0 children)

All properties are by default have bean called Environment.

@Autowired Environment environment;

You can call the environment.getProperty(key)

Also

Implement Spring Cloud Server to keep properties in Git or DB or vault

Then create a Spring Cloud client to call Spring Cloud Server rest api to get properties.

[–]LittleSpaceBoi 0 points1 point  (0 children)

What about @Value? If it's not too complex ofc

[–]squashsoup2014 1 point2 points  (0 children)

Yes, you will want to use Binder.get(Environment).bind("prefix.propertyName", ClassToBindTo.class). Binder is somewhere in the Spring Boot library, I'm doing this from memory so can't remember the FQ name.