@Component is Spring Framework’s annotation to automatically create an instance of this class when the application starts and register it with the application context.
@ConfigurationProperties is a Spring Boot annotation that labels this Spring bean as a source of configuration properties. It indicates that the prefix of such properties will be my.app.
xxxxxxxxxx
@Component
@ConfigurationProperties(prefix = "my.app")
public class MyCustomProperties {
// if you need a default value, assign it here or the
constructor
private String header;
private String footer;
// getters and setters
}
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/