Replies: 1 comment 1 reply
-
|
(originally posted by "Cupcat702") Hi @harawata, Thank you for your work on PR #1594. I am trying to utilize this feature to simplify my SQL mappers, but I've encountered a struggle regarding inner classes/enums. In my project (using MyBatis-Plus), I have configured the alias package as follows: YAML mybatis-plus: Inside this package, I have an interface CodeConstant which contains several nested enums, such as DELETED_FLG. While CodeConstant itself is correctly registered as an alias, I found that I cannot access its inner enums using the alias in OGNL expressions. Specifically: This fails with ClassNotFoundException: This works, but requires the "annoying" full package path: It seems the TypeAliasRegistry (via type-aliases-package scan) only registers the top-level class but ignores nested members. Is there a way to make the alias system recognize inner classes without manually adding |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(originally posted by "Cupcat702")
我在yml中写入了mybatis-plus: type-aliases-package: jp.co.fminc.socia.common.constant 然后我在xml中是这样写的
WHERE f.deleted = ${@CodeConstant$DELETED_FLG@FALSE.getCode()}但由于是内部类的原因 似乎没有办法做typeAlias,所以我困惑的点是我不知道怎么解决掉全限定包名恼人的报错Beta Was this translation helpful? Give feedback.
All reactions