struts2_Design convention

设计约定(编码规定)

  1. 原则:简单就是美
  2. 数据库名:项目名
  3. 表的名字: _Model名
  4. 字段:保持和预模型属性名一致 (尽量不要起名和数据库命名冲突)
  5. 用层来划分包 com.xx.bbs.action (model{bean}  service  DAO ? DTO{VO,DO})
  6. Action里面命名:XXAction
  7. JSP里面命名: *-*
  8. namespace :前台路径 :  / ,后台路径: /admin
  9. package命名: 前台-action , 后台-adminaction
时间: 2024-08-26 17:03:03

struts2_Design convention的相关文章

菜鸟学Struts2——零配置(Convention )

又是周末,继续Struts2的学习,之前学习了,Struts的原理,Actions以及Results,今天对对Struts的Convention Plugin进行学习,如下图: Struts Convention支持零配置进行开发,也就是约定约定优于配置的方式. (1)环境准备 使用Convention Plugin进行开发,需要引入struts2-convention-plugin,完整的pom.xml依赖如下: 1 <dependency> 2 <groupId>org.apa

Stardard coding convention

Today, I fix one ccr of wording change. One solution I chose is to use macro to replace the string. Like this one, #define REPLCE_STRING   _T("coding") CString str; str.Format(""REPLCE_STRING" and perfect"); The replace above

error: property&#39;s synthesized getter follows Cocoa naming convention for returning &#39;owned&#39; objects

出现这种情况,主要是属性名中包含  关键字. You can solve this by: Renaming that property: @property (strong, nonatomic) NSString *theNewTitle; Keeping the property name and specifying a getter name that doesn't begin with one of the special method name prefixes: @proper

Error解决:Property&#39;s synthesized getter follows Cocoa naming convention for returning &#39;owned&#39;

在项目中定义了以new开头的textField,结果报错: 先看我的源码: #import <UIKit/UIKit.h> @interface ResetPasswordViewController : UIViewController @property (weak, nonatomic) IBOutlet UITextField *phoneTextField; @property (weak, nonatomic) IBOutlet UITextField *oldPasswordTe

Struts2的Convention插件

Struts2的Convention插件的作用:在Struts2中的/lib/struts2-convention-plugin-x.x.xx.x.jar Convention插件会自动搜索位于action,actions,struts,struts2包下的所有类,即它会把如下两种的Java类当初Action处理:    所有实现了com.opensymphony.xwork2.Action的Java类    所有类名为Action结尾的Java类 例如:    com.app.action.L

struts2 Convention插件零配置,使用注解开发

从struts21开始,struts2不再推荐使用codebehind作为零配置插件,而是改用Convention插件来支持零配置.与以前相比较,Convention插件更彻底. 使用Convention插件,需要将struts2-convention-plugin-2.3.1.2.jar文件复制到lib目录中即可 这个插件是自动搜索action的功能: 规则如下:它会自动搜索位于action,actions,struts.struts2包下的java类.   Convention插件会把如下两

[CSS] Reduce Ambiguity in Class Names using a Naming Convention

A solid naming convention makes it less likely to run into naming conflicts and helps establish a semantic pattern that is easier for a team to follow. In this lesson, I'm using a variation of the BEM (Block Element Model) naming convention. OOCSS an

【BZOJ-1178】CONVENTION会议中心 倍增 + set (神思路好题!)

1178: [Apio2009]CONVENTION会议中心 Time Limit: 15 Sec  Memory Limit: 162 MBSubmit: 812  Solved: 323[Submit][Status][Discuss] Description Siruseri政府建造了一座新的会议中心.许多公司对租借会议中心的会堂很感兴趣,他们希望能够在里面举行会议. 对于一个客户而言,仅当在开会时能够独自占用整个会堂,他才会租借会堂.会议中心的销售主管认为:最好的策略应该是将会堂租借给尽

function calling convention

这是2013年写的一篇旧文,放在gegahost.net上面 http://raison.gegahost.net/?p=31 February 19, 2013 function calling convention Filed under: c++ — Tags: C convention, C optimization, multi-thread — Raison @ 4:29 am (original works by Peixu Zhu) Function calling conven