代码模板

1.mapper:空间的引入

<!DOCTYPE mapper PUBLIC

        "-//mybatis.org//DTD com.example.Mapper 3.0//EN"

        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

 

 

 2.js中空的判断

//空判断方法
function StringEmpty(v2){
    if(v2 == "" || v2 == null || v2== undefined||v2.replace(/(^s*)|(s*$)/g, "")==0){
        return true;
    }
}
//非空判断
function isNotEmpty(v2){
    if(v2 != "" && v2 != null && v2!= undefined&&v2.replace(/(^s*)|(s*$)/g, "")!=0){
        return true;
    }
}

 

3.#pagehelper分页插件配置
pagehelper.helperDialect=mysql
pagehelper.reasonable=true
pagehelper.supportMethodsArguments=true
pagehelper.params=count=countSql

 

4.MySQLurl配置:

 jdbc:mysql://localhost:3306/testall?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

 

posted @ 2020-05-11 17:40  归来已是香菜人  阅读(274)  评论(0)    收藏  举报