Comments 3
Properties лучше делать не mutable, не ставить Data аннотацию
https://andbin.dev/java/spring-value-annotation-with-lombok
А как обыграете ситуацию с RefreshScope?
RefreshScope
A bean that is declared in @RefreshScope is created as a proxy. The actual target bean is also created on startup and stored in a cache with a key equal to its bean name. When a method call arrives at the proxy, it is passed down to the target. When the EnvironmentChangeEvent is consumed the cache is cleared and the BeanFactory callbacks on bean disposal are called by Spring, so the next method call on the proxy results in the target being re-created (the full Spring lifecycle, just as with any Scope).
https://gist.github.com/dsyer/a43fe5f74427b371519af68c5c4904c7#refreshscope
Spring Boot Starter: практически, принципиально и подробнее. Часть 3