MyBatis version
3.4.4
Situation
One generic handler for several java classes:
@MappedTypes({ FirtsClass,.., LastClass, ... 57 classes})
public class ConstantTranslationHandler<E extends Enum & HasValue> extends BaseTypeHandler {
...
}
Just one handler declared in ibatis-config
Result
- 57 handlers are created when the application is started
- When the resultmap is obtained, the handler is called correctly, but the wrong handler!!!
- I debugged and i realized that there was one handler per each class but the TypeHandlerRegistry always return the last instanced handler .