Complex Spring Placeholder Resolution

Image by Karsten Paulick from Pixabay

I had a complicated case for Spring Boot properties configuration today that I’d like to share.

My project uses Atomikos for XA transaction management. Atomikos needs to store its transaction logs somewhere, and there’s a special Spring Boot property spring.jta.log-dir that configures the directory to use for these logs. The property is configured in the application.yml file.