I’m using spring Binder
to load YAML content into a POD instance. My code works well but I would need that it returns an error or throws an exception if a property (from the YAML file) is not bindable to my POD
import org.springframework.boot.context.properties.bind.Binder;
ConfigurationPropertySource source = loadYamlFile(filePath);
Binder binder = new Binder(source);
BindResult<T> bind = binder.bind(yamlRootProperty, Bindable.of(myPodClazz));
return bind.get();
Indeed, in that case, there would be a syntax error in the YAML. Currently the property is ignored, I would like to get an error
Thanks for helping