I have an Integer autowired in constructor like that:
@Value("${application.someNumber:0}") Integer number)
And there is NullPointerException if nmber is null in configuration. How to write this expression so that if it is null then it would be set to 0 ? Then I would throw my own validation expetion somewhere else.. ?