JEECG 命名规范

举例讲解代码规范


例如:表名 :jeecg_sys_demo


第一部分:代码文件命名规则如下:
首先:表名采用驼峰写法转换为Java代码使用单词  jeecg_sys_demo => JeecgSysDemo
[1].control命名 :JeecgSysDemoControl
[2].Servlice命名:JeecgSysDemoServiceI/JeecgSysDemoServiceImpl
[3].JSP命名      :jeecg-sys-demo.jsp(表单页面)
                 jeecg-sys-demo-list.jsp(列表页面)
                 jeecg-sys-demo-*.jsp(新增表单页面 例如:detail)
[4].control中方法命名:
              页面触发业务方法以do*开头
              页面跳转方法以go*开头
    (方法标签注释需和方法名保持一致)
   


第二部分:代码注释规范
[1].代码存在缺陷或者留有功能点的代码,采用以下方式进行标示
      //TODO author:zhangdaihao  for:插入未完成 date:20130711
[2].系统已有代码的修改采用以下注释
 //----------------------------------------------------------------
//update-begin--Author:zhangdaihao  Date:20130205 for:[bugfree号]树机构调整
//update-end--Author:zhangdaihao  Date:20130205 for:[bugfree号]树机构调整
//---------------------------------------------------------------- 
[3].业务逻辑注释
    a.方法注释 参入传出参数注释说明        
展开阅读全文

mybatis想打开驼峰命名映射,但总提示无法识别mapUnderscoreToCamelCase

10-18
** 错误提示: ** ### Error building SqlSession. ### The error may exist in SQL Mapper Configuration ### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting mapUnderscoreToCamelCase is not known. Make sure you spelled it correctly (case sensitive). at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:32) at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:16) ** mybatis配置文件:** <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <settings> <setting name="mapUnderscoreToCamelCase" value="true" /> </settings> <typeAliases> <typeAlias alias="OrdersEntity" type="com.jeecg.order.entity.OrdersEntity" /> <typeAlias alias="ExpressOrder" type="ems.dao.ExpressOrder" /> </typeAliases> <environments default="development"> <environment id="development"> <transactionManager type="JDBC" /> <dataSource type="POOLED"> <property name="driver" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://127.0.0.1:3306/dbname?serverTimezone=UTC" /> <property name="username" value="dbuser" /> <property name="password" value="mima" /> </dataSource> </environment> </environments> <mappers> <mapper resource="ems/mapper/order.xml"></mapper> <mapper resource="ems/mapper/ExpressOrder.xml"></mapper> <mapper resource="ems/mapper/OrdersEntityMapper.xml"></mapper> </mappers> </configuration>
©️2020 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值