Replies: 1 comment
-
|
This won't work as you've discovered. MyBatis calculates result maps at startup and there is no current mechanism for dynamically changing them. If you want a truly dynamic result, then the return type should be |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
decalared as this
<T> T query(@Param("sql") String sql,@Param("type") Class<T> type);in xml file
<select id="query" resultType="${type}"> ${sql} </select>it dose';t work ,Caused by: java.lang.ClassNotFoundException: Cannot find class: ${type}how to implements the function , the return type is determined by the runtime paramaters
Beta Was this translation helpful? Give feedback.
All reactions