`@ConfigurationProperties` is better for binding groups of related settings into a typed object, supports nested properties and validation, and keeps config cohesive. `@Value` is fine for single values, but it’s less type‑safe for large configs.
@ConfigurationProperties(prefix = "app")
public class AppProps {
private String name;
public String getName() { return name; }
public void setName(String name) { this.name = name; }
}