I am getting resource with the following manner.
@Value("classpath:user-pass.json")
private Resource resource;
I want to set a default value for the resource if the above resource not found. We can set default value in property extraction as follow
@Value("${some.key:my default value}")
private String string;
I need help in applying a similar formula to resource acquiration.
Resource above is from
package org.springframework.core.io