i have something like that..
in file application.properties
input.param.resolution=high
input.param.size=1024
in a configuration class
@Configuration
public class FirstConfiguration {
@Bean
@ConfigurationProperties("input.param")
Data buildDataBean() {
return new Data();
}
}
my pojo
public class Data {
String resolution;
String size;
// getters and setters
}
I'd like to unauthorize binding when my String are not provided in properties file.. (and make Spring launch an exception)
input.param.resolution=<nothing-here>
input.param.size=<nothing-here>
How can i do this ?