My solution to hiding a DB-Password in Spring Boot App's application.properties does implemented here.
Scenario: some fake password already reading and saved from application.properties on start, in global Spring object ConfigurableEnvironment will be, in Run-Time replaced programmaticaly, by real DB-Password. The real password will be reading from another config file, saved in safe, project-outer place.
Don't forget: call the the Bean from main class with:
@Autowired
private SchedUtilility utl;