转自:http://www.68idc.cn/help/jiabenmake/qita/20140821125261.html 在mybatis的映射xml文件调用java类的方法: 1. SELECT * FROM EC_CORE_USER WHERE (user_name=#{userName} or mail =#{userName} or mobile_phone = '${@net.ytoec.framework.security.EncryptionDecryption@dSecre…
Class定义常量方法(推荐方法) //final修饰符 public final class Constants { //私有构造方法 private Constants() {} public static final int ConstantA = 100; public static final int ConstantB = 100; ...... } 采用“类.常量名”方法进行调用.需要私有化构造方法,避免创建该类的实例.同时不需让其他类继承该类. 如果多处需要访问工具类中定义的常量…