1.mybatis判断是否为空或null <if test="type!=null and type!=''"> AND type = #{type} </if> 2.Mybatis中的like查询 今天要做一个模糊查询 用的Mybatis 开始写的是: select id,bookName,author,publisher,donor,status,createDate,lastUpdate from book <where> <if tes…
Java中关于static语句块的理解 一.static块会在类被加载的时候执行且仅会被执行一次,一般用来初始化静态变量和调用静态方法. 实例一 public class A{ String name; public A(String name){ this.name = name; } //静态块 static{ System.out.println("static语句块执行"); } public static void main(String args[]){ A a = new…