1. Concept library
  2. Java & Spring Boot
  3. Module 6: Spring Boot fundamentals

Concept

Application properties

application.yml holds configuration: ports, database URLs, feature flags. @ConfigurationProperties binds a section to a typed, validated class so the rest of the code never reads raw strings.

What a session covers

The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.

  1. Explain what application.yml holds and how profiles layer it
  2. Bind a section to a @ConfigurationProperties class and validate it
  3. Spot @Value scattered across services

In practice

A few lines that show Application properties doing its job.

Java
@ConfigurationProperties(prefix = "billing")
@Validated
public record BillingProperties(@NotBlank String currency, @Min(1) int trialDays) {}

// application.yml
// billing:
//   currency: USD
//   trial-days: 7

@Service
class TrialService {
    TrialService(BillingProperties billing) { /* billing.trialDays() */ }
}

The common mistake

Watch for

Scattering @Value("${some.key}") across services. Typos are found at runtime one at a time, and there is no single place that says what the application can be configured with.

What to know first

Your roadmap puts these before Application properties, unless you already know them.

How it stays learned

Once a session shows you understand Application properties, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.

  1. Day 3First recall, while it is fresh
  2. Day 7Second, a week on
  3. Day 18Last, when it has settled

Where it leads

Topics that build on Application properties.

Previous in the module← Dependency injection