intermediateSpring Core Annotations

What does @ConfigurationProperties do, and how is it different from @Value?

@ConfigurationProperties binds an entire group of related, hierarchical configuration properties (e.g. everything under app.mail.*) into a single strongly-typed POJO with matching fields, all at once, with built-in validation support. @Value injects one individual property at a time into one field — @ConfigurationProperties is the better choice once you have more than a couple of related settings, since it avoids a long list of scattered @Value fields.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What does @ConfigurationProperties do, and how is it different from @Value?

Next Step

Continue to What is transaction isolation? Explain the 4 isolation levels.← Back to all Spring Boot & Microservices questions