-
Notifications
You must be signed in to change notification settings - Fork 2.6k
There is case that fail to register type alias when exists anonymous class since mybatis-spring 2.0.1 #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This also has a similar effect if there are enums present in the package. |
This bug make by #359. Should be filtered anonymous class, interface and inner class such same as Workaround: e.g. mybatis:
type-aliases-package: io.github.cd871127.**.model |
Filter anonymous class and interface when package scan
Hi @cd871127, Thank you for your report! I've fixed this and 2.0.2-SNAPSHOT has been deployed OSS snapshot repository . Could you check can be resolve this issue on your application using 2.0.2-SNAPSHOT? If there is problem in latest 2.0.2-SNPASHOT, please feedback. Thanks again! |
@kazuki43zoo it's ok using 2.0.0, thanks a lot! |
Filter anonymous class and interface when package scan
version
mybatis-spring 2.0.1
mybatis 3.5.1
It will throw
org.apache.ibatis.type.TypeException
, when exist two SQL provider.In class
org.mybatis.spring.SqlSessionFactoryBean
, line 464, it invokeregisterAlias(Class<?> type)
directly, skipregisterAliases(String packageName, Class<?> superType)
. In old version ,registerAlias(Class<?> type)
was invoke byregisterAliases(String packageName, Class<?> superType)
, will skip some classes.TypeAliasRegistry
config
Mapper
Exctption
The text was updated successfully, but these errors were encountered: