Which two statements are correct regarding the differences between @ConfigurationProperties and @Value? (Choose two.)
Which two statements are correct regarding the differences between @ConfigurationProperties and @Value? (Choose two.)
ConfigurationProperties is preferable over @Value when type-safety during property binding is a concern. Additionally, @ConfigurationProperties supports relaxed binding of properties, but not property binding through SpEL. This makes @ConfigurationProperties suitable for binding externalized configuration properties to strongly-typed beans, ensuring that the loaded values conform to specific types or structures.
See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.external-config.typesafe-configuration-properties.vs-value-annotation https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.external-config.typesafe-configuration-properties.relaxed-binding