Optional is usually not recommended for ConfigurationProperties. This is a known behaviour which spring-boot marked as 'not a bug, but a feature'.
Source : https://github.com/spring-projects/spring-boot/issues/21868
Checkout these comments specifically :