MyBatis version
3.2.4, master code seems to be the same
Database vendor and version
Oracle, but not DB specific
Test case & Steps to reproduce
interface BeanInterface<T> {
void setProperty(T value);
}
class BeanClass implements BeanInterface<String> {
void setProperty(String value);
}
now use bean of BeanClass in mapping
Expected result
mapping works
Actual result
org.apache.ibatis.reflection.ReflectionException: Illegal overloaded setter method with ambiguous type for property property in class interface package.BeanInterface. This breaks the JavaBeans specification and can cause unpredicatble results.
Workaround
Introduce a getter
class BeanClass implements BeanInterface<String> {
void setProperty(String value);
String getProperty();
}