为了突出重点,只贴出相关的部分。
mybatis-config.xml文件对mapper文件引用:
UserMapper.xml文件,其中resultType的值是map:
UserMapper.java接口定义:
代码调用片段:
运行输出:
为了突出重点,只贴出相关的部分。
mybatis-config.xml文件对mapper文件引用:
UserMapper.xml文件,其中resultType的值是map:
UserMapper.java接口定义:
代码调用片段:
运行输出: