随笔分类 - mybatis
摘要:if 和where 动态sql(所有都要+and) <select id="xx" resultMap="xx"> select * from user <where> <if test="xx!=' ' and xx!=null"> and xxx like concat ('%',#{xxx},
阅读全文
摘要:在log4j中添加 <span style="font-size:12px;">log4j.rootLogger = ${log.level},Console,default,allfile log4j.logger.com.ibatis=debug log4j.logger.java.sql=de
阅读全文
摘要:The content of elements must consist of well-formed character data or markup. 特殊字符有: < 小于号 ,>大于号等 要用 <![CDATA[ select * from tb_users where id<=100 ]]
阅读全文
摘要:1.@Param("XX")String XXX 注入到SQL语句中#{XX} 2.controller (@RequestParam String XX)
阅读全文
摘要:1.读取全局配置文件String resource="mybatis-config.xml"; InputStream is=Resources.getResourceAsStream(resource); 2.创建SqlSessionFactory对象 SqlSessionFactory fact
阅读全文
浙公网安备 33010602011771号