Spring Boot 4 · Configuration

Bind properties to a class

Map properties with the prefix app to a typed class.

@ConfigurationProperties(prefix = "app")
public record AppProperties(String name, int timeout) {}

Official Spring Boot 4 documentation

More configuration commands

All configuration commands · Spring Boot 4 cheatsheet

Was this page helpful?