View all questions & answers for the 2V0-72.22 exam
Which two statements are correct regarding the differences between @ConfigurationProperties and @Value? (Choose two.)
@Value must be used for environment variables, as @ConfigurationProperties cannot access the environment.
@Value supports relaxed binding of properties, but not property binding through SpEL.
@ConfigurationProperties is preferable over @Value when type-safety during property binding is a concern.
@ConfigurationProperties only bind properties from .properties files, not from .yml files.
@ConfigurationProperties supports relaxed binding of properties, but not property binding through SpEL.
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.external-config.typesafe-configuration-properties.vs-value-annotation
Submit