The proper way to define configuration properties in Spring

Upgrading from Spring Boot 2 to 3 forced me to define my configuration properties in a better way.