├── fast-sample
├── src
│ └── main
│ │ ├── resources
│ │ ├── fast.properties
│ │ └── log4j.properties
│ │ ├── webapp
│ │ ├── error
│ │ │ ├── 403.html
│ │ │ ├── 404.html
│ │ │ └── 500.html
│ │ ├── index.html
│ │ └── WEB-INF
│ │ │ └── web.xml
│ │ └── java
│ │ └── org
│ │ └── bysocket
│ │ ├── entity
│ │ └── User.java
│ │ └── controller
│ │ ├── HelloWorldController.java
│ │ └── RestfulJSONController.java
└── pom.xml
├── doc
└── img
│ ├── json-post.png
│ ├── sample-result.png
│ └── sample-json-result.png
├── fast-core
├── src
│ ├── test
│ │ ├── resources
│ │ │ └── fast.properties
│ │ └── java
│ │ │ └── org
│ │ │ └── fastframework
│ │ │ ├── mvc
│ │ │ ├── ControllerCollectionTest.java
│ │ │ └── DispatcherServletTest.java
│ │ │ └── util
│ │ │ ├── ClassUtilTest.java
│ │ │ ├── ReflectUtilTest.java
│ │ │ ├── TimeUtilTest.java
│ │ │ ├── PropertyUtilTest.java
│ │ │ └── JSONUtilTest.java
│ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── fastframework
│ │ │ ├── mvc
│ │ │ ├── annotation
│ │ │ │ ├── RequestMethod.java
│ │ │ │ ├── PostParam.java
│ │ │ │ ├── Controller.java
│ │ │ │ ├── RequestMapping.java
│ │ │ │ └── MediaTypes.java
│ │ │ ├── bean
│ │ │ │ ├── RequestBody.java
│ │ │ │ └── HandlerBody.java
│ │ │ ├── HandlerMapping.java
│ │ │ ├── util
│ │ │ │ └── MVCHelper.java
│ │ │ ├── ViewResolver.java
│ │ │ ├── DispatcherServlet.java
│ │ │ ├── HandlerInvoker.java
│ │ │ └── ControllerCollection.java
│ │ │ ├── util
│ │ │ ├── ReflectUtil.java
│ │ │ ├── JSONUtil.java
│ │ │ └── WebUtil.java
│ │ │ └── core
│ │ │ ├── Config.java
│ │ │ └── util
│ │ │ ├── PropertiesUtil.java
│ │ │ ├── TimeUtil.java
│ │ │ └── ClassUtil.java
│ │ └── resources
│ │ └── log4j.properties
└── pom.xml
├── .gitignore
├── README_EN.md
├── ChangeLog.txt
├── .editorconfig
├── README.md
├── pom.xml
└── LICENSE
/fast-sample/src/main/resources/fast.properties:
--------------------------------------------------------------------------------
1 | ## 扫描包目录
2 | package.scan=org.bysocket
--------------------------------------------------------------------------------
/doc/img/json-post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeffLi1993/fast-framework/HEAD/doc/img/json-post.png
--------------------------------------------------------------------------------
/doc/img/sample-result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeffLi1993/fast-framework/HEAD/doc/img/sample-result.png
--------------------------------------------------------------------------------
/doc/img/sample-json-result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeffLi1993/fast-framework/HEAD/doc/img/sample-json-result.png
--------------------------------------------------------------------------------
/fast-core/src/test/resources/fast.properties:
--------------------------------------------------------------------------------
1 | fast.framework.name=fast
2 | fast.framework.author=bysocket
3 | fast.framework.age=1
4 | package.scan=org.fastframework
--------------------------------------------------------------------------------
/fast-sample/src/main/webapp/error/403.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403
6 |
7 |
8 | Hello,403!
9 |
10 |
--------------------------------------------------------------------------------
/fast-sample/src/main/webapp/error/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 404
6 |
7 |
8 | Hello,404!
9 |
10 |
--------------------------------------------------------------------------------
/fast-sample/src/main/webapp/error/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 500
6 |
7 |
8 | Hello,500!
9 |
10 |
--------------------------------------------------------------------------------
/fast-sample/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | Hello,BYSocket!
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Mobile Tools for Java (J2ME)
4 | .mtj.tmp/
5 |
6 | # Package Files #
7 | *.jar
8 | *.war
9 | *.ear
10 |
11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12 | hs_err_pid*
13 |
--------------------------------------------------------------------------------
/fast-core/src/main/java/org/fastframework/mvc/annotation/RequestMethod.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.mvc.annotation;
2 |
3 | /**
4 | * HTTP Request Method
5 | *
6 | * Created by bysocket on 16/8/4.
7 | */
8 | public enum RequestMethod {
9 | GET, POST, PUT, PATCH, DELETE
10 | }
11 |
--------------------------------------------------------------------------------
/fast-core/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=DEBUG, stdout
2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3 | log4j.appender.stdout.Target=System.out
4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5 | log4j.appender.stdout.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
--------------------------------------------------------------------------------
/fast-core/src/test/java/org/fastframework/mvc/ControllerCollectionTest.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.mvc;
2 |
3 | /**
4 | * Created by bysocket on 16/8/4.
5 | */
6 | public class ControllerCollectionTest {
7 | public static void main(String[] args) {
8 | ControllerCollection.init();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/fast-sample/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=DEBUG, stdout
2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3 | log4j.appender.stdout.Target=System.out
4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5 | log4j.appender.stdout.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n
--------------------------------------------------------------------------------
/README_EN.md:
--------------------------------------------------------------------------------
1 | [](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.bladejava%22)
2 | [](https://www.apache.org/licenses/LICENSE-2.0.html)
3 | [中文文档](https://github.com/JeffLi1993/fast-framework/blob/master/README.md)
4 |
5 | # fast-framework
--------------------------------------------------------------------------------
/fast-core/src/main/java/org/fastframework/mvc/annotation/PostParam.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.mvc.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Created by duqi on 16/8/26.
10 | */
11 | @Target(ElementType.PARAMETER)
12 | @Retention(RetentionPolicy.RUNTIME)
13 | public @interface PostParam {
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/fast-core/src/main/java/org/fastframework/mvc/annotation/Controller.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.mvc.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * Controller 注解
10 | *
11 | * Created by bysocket on 16/7/20.
12 | */
13 | @Target(ElementType.TYPE)
14 | @Retention(RetentionPolicy.RUNTIME)
15 | public @interface Controller {
16 | }
17 |
--------------------------------------------------------------------------------
/fast-core/src/test/java/org/fastframework/util/ClassUtilTest.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.util;
2 |
3 | import org.fastframework.core.util.ClassUtil;
4 | import org.fastframework.mvc.annotation.Controller;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * Created by bysocket on 16/7/21.
10 | */
11 | public class ClassUtilTest {
12 | public static void main(String[] args) {
13 | // ClassUtil.getClassList("org.fastframework");
14 | List> controllerClassList = ClassUtil.getClassListByAnnotation("org.fastframework", Controller.class);
15 | return;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/ChangeLog.txt:
--------------------------------------------------------------------------------
1 | ==========================================================================================
2 | v0.1.1 更新:
3 | ==========================================================================================
4 |
5 | > Bug 修复:
6 | -----------------
7 | 1、修复入参多参数无序问题
8 | 2、修复 POM 项目格式问题
9 | 3、修复返回值 JSON 内容格式未处理问题
10 |
11 | > 增加 RESTful 支持:
12 | -----------------
13 | 1、支持响应格式 Content-Type: application/json; charset=UTF-8
14 | 2、支持 POST Content-Type: application/json 传输
15 | 3、基于 JDK 8 time包的时间工具类
16 |
17 | > 增加 fast-framework sample:
18 | -----------------
19 | 1、新增 JSON 响应 demo 案例
20 | 2、新增 POST 请求 User Bean 案例
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 |
9 | # Change these settings to your own preference
10 | indent_style = space
11 | indent_size = 4
12 |
13 | # We recommend you to keep these unchanged
14 | end_of_line = lf
15 | charset = utf-8
16 | trim_trailing_whitespace = true
17 | insert_final_newline = true
18 |
19 | [*.md]
20 | trim_trailing_whitespace = false
21 |
22 | [{package,bower}.json]
23 | indent_style = space
24 | indent_size = 2
25 |
26 | [pom.xml]
27 | indent_style = tab
28 |
--------------------------------------------------------------------------------
/fast-core/src/test/java/org/fastframework/util/ReflectUtilTest.java:
--------------------------------------------------------------------------------
1 | package org.fastframework.util;
2 |
3 | /**
4 | * Created by bysocket on 16/8/9.
5 | */
6 | public class ReflectUtilTest {
7 | public static void main(String[] args) {
8 | // TestController controller = new TestController();
9 | // Class> controllerClazz = controller.getClass();
10 | // Method controllerMethod = controllerClazz.getMethods()[0];
11 | // List