问题:写了一个新的dao接口,进行单元测试时提示: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'maxActive'; nested exceptio
#{}占位符用来设置参数,参数的类型可以有3种,基本类型,自定义类型,map基本类型作为参数,参数与占位符中的名称无关. <select id="findById" parameterType="int" resultType="cn.wh.vo.Role"> select * from t_role where id = #{xxxid} </select> 测试: @Test public void testSelec
一.占位符解析器源码 1.占位符解析器实现的目标 通过解析字符串中指定前后缀中的字符,并完成相应的功能. 在mybtias中的应用,主要是为了解析Mapper的xml中的sql语句#{}中的内容,识别当前sql语句的一些特性. 2.占位符解析器的通用算法类 (1)org.apache.ibatis.parsing.GenericTokenParser public class GenericTokenParser { private final String openToken; private