公司开发平台说明文档 公司信息技术 2011-3-18
目录
一、概述 ..........................................................................................................................................4
二、架构介绍 ..................................................................................................................................4
三、代码规范 ..................................................................................................................................5
1. Java 命名约定 .....................................................................................................................5
1.1 一般概念 ...................................................................................................................5
1.2 示范 ...........................................................................................................................5
2. Java 注释约定 .....................................................................................................................6
2.1. 一般概念 ..................................................................................................................6
2.2. 示范 ..........................................................................................................................6
2.3. 注释哪些部分 ..........................................................................................................6
3. Java 文件样式约定..............................................................................................................7
3.1 版权信息 ...................................................................................................................7
3.2 Package/Imports......................................................................................................7
3.3 Class .........................................................................................................................7
3.4 Class Fields ...............................................................................................................7
3.5 存取方法(类的设置与获取成员函数)................................................................8
3.6 构造函数 ...................................................................................................................8
3.7 克隆方法 ...................................................................................................................8
3.8 类方法 (类的普通成员函数)..............................................................................8
3.9 toString 方法 ..........................................................................................................8
3.10 main 方法 .............................................................................................................8
4. Java 编码其它约定...............................................................................................................9
4.1 文档化 .......................................................................................................................9
4.2 缩进 ...........................................................................................................................9
4.3 页宽 ...........................................................................................................................9
4.4 {} 对.........................................................................................................................9
4.5 括号 ...........................................................................................................................9
4.6 JSP 文件命名 ...........................................................................................................9
4.7 Servlet 类命名 .......................................................................................................10
四、项目简介 ................................................................................................................................10
1、简介 ..................................................................................................................................10
2、cmsdemo-dao 工程简介 ..................................................................................................10
3、cmsdemo-service 工程简介 .............................................................................................13
4、部署步骤 ..........................................................................................................................16