Recently I saw code like this:
@Bean
@Validated
@ConfigurationProperties(prefix = "jobrunner.filesystem")
public ExecutionFileSystemProperties executionFileSystemProperties() {
return new ExecutionFileSystemProperties();
}
Why do that? We can use @Component and Spring will find them ourselves
P.S. Same project has @Component, @service, etc.