1. mybatis的日志打印:

    在log4j.properties 里面添加如下的语句

#log4j.logger.org.apache.ibatis=debug,stdout

#log4j.logger.java.sql=debug,stdout

Mybatis 的多个参数的使用和 sql日志的打印

  1. 多个String类型的参数的导入:

<select >

        select *

        from t_business_classificationmeta where 1=1

        <if test="#{1} != null and #{1} != ''"> and TITLE = #{1}</if>

        <if test="#{0} != null and #{0} != ''"> and CLASSIFICATIONCODE=#{0} </if>

    </select>

 

不是直接使用名称进行代替。

相关文章:

  • 2021-04-25
  • 2021-05-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2022-02-13
  • 2021-09-09
  • 2021-08-24
  • 2022-12-23
相关资源
相似解决方案