问题
Imean that there might be two or more
XXXConverter extends ReflectionConverter
that might return true here
public boolean canConvert(Class aClass)
for the same class
回答1:
Only one converter will be used for a class.
If you register multiple converters with the same priority, then the most recently registered one will be used.
Take a look at the source for DefaultConverterLookup
.
回答2:
I guess they'd both convert it. But I guess the best answer would be to either look it up in the documentation, or just try it out.
来源:https://stackoverflow.com/questions/5077309/what-happens-if-multiple-converters-can-unmarshal-xml