mybatis 返回类型为 java.lang.String 接收为null的情景

<select id="selectOnly" parameterType="java.util.Map" resultType="java.lang.Sring">
select temp_table from orders_status where chaxun=#{chaxun};
</select>
String db_tempTable = sqlSession.selectOne(MybatisNamespace.ordersStatus_selectOnly,chaxun);  拿到的是 null

改为下面的就可以了
<select id="selectOnly" parameterType="java.util.Map" resultType="string">
select temp_table from orders_status where chaxun=#{chaxun};
</select>
原文地址:https://www.cnblogs.com/LiuPan2016/p/8652466.html