Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Name

struts2-coc-plugin

Publisher

铁木箱子

License

Open Source (ASL2)

Version

0.1

Compatibility

Struts 2.1.8+

Homepage

http://code.google.com/p/struts2-coc-plugin/

Download

http://code.google.com/p/struts2-coc-plugin/downloads/list

Wiki Markup{rate:title=Rating|theme=dynamic|key=5}

Overview

struts2-coc-plugin is struts2 plugin that based on Convention plugin.It do some coding optimization and coding convention,such as the mapper of URI and action method、file upload handle、json/text result response、validation input result redefined、action message populate after redirect and so on.The main purpose of struts2-coc-plugin is to help developer to develop with zero configuration but still guarantee the structure of project clearly and maintain easily!

struts2-coc-plugin是一款基于Convention插件的struts2插件,该插件主要在Convention插件基础上优化了部分处理流程,比如uri地址和action方法的映射、文件上传的处理、json/text文本输出的处理、校验和操作提示信息的处理等等。该插件的唯一目的就是真正的不进行一行配置,同时可以保持项目结构的清晰便于开发维护。excerptINLINE

Struts2-coc-plugin is designed to help developer develop with zero configuration and still guarantee the structure of project clearly and maintain easily!

Features

struts2-coc-plugin is a plugin base on Convention plugin,it handle some thing to coding optimization and convention as following:

1.every action can service multiple request with simple uri

2.can redefine the input result in validation method with one method call

3.support define the different size and extensions of file when upload file through different url

4.support forward to view page directly when the method was not defined in the action

5.simple way to response the json and text to client through java annotations

6.support to populate the message that generated by action after the redirect

 

struts2-coc-plugin是一个基于Convention插件的struts2插件,该插件主要做了如下优化和约定开发:

1、每个action可以支持多个访问入口,使用普通的uri即可访问

2、在validate方法中可以通过调用父action的方法重新定义结果页面,默认的struts是返回到input界面

3、支持不同url地址文件上传时文件的大小、类型分别指定

4、支持当访问的url对应的action中没有指定的方法时可以直接定位到视图页面

5、json和文本输出的直接支持,简单的通过注解就可以实现方法的json和文本输出

6、action操作信息和错误信息处理,可以在redirect后取到并进行处理

Usage

1.Download latest artifact from http://code.google.com/p/struts2-coc-plugin/downloads/list

...

4.Configure the struts.properties and add following segments:

...

5.Coding with struts2-coc-plugin:

...

Example

The whole documents and examples you can find here:http://code.google.com/p/struts2-coc-plugin/w/list

...