我在注册自定义属性编辑器时遇到问题。我像这样注册它:
class BooleanEditorRegistrar implements PropertyEditorRegistrar {
public void registerCustomEditors(PropertyEditorRegistry registry) {
registry.registerCustomEditor(Boolean.class,
new CustomBooleanEditor(CustomBooleanEditor.VALUE_YES, CustomBooleanEditor.VALUE_NO, false))
registry.registerCustomEditor(Boolean.class,
new CustomBooleanEditor(CustomBooleanEditor.VALUE_ON, CustomBooleanEditor.VALUE_OFF, true))
}
}
但唯一的第一个被应用。可以注册多个吗?