GithubHelp home page GithubHelp logo

tangkuo / fast-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeffli1993/fast-framework

0.0 3.0 0.0 258 KB

基于 JDK8 实现的轻量级 Java Web 框架

License: Apache License 2.0

Java 98.95% HTML 1.05%

fast-framework's Introduction

泥瓦匠本意:
" 生产暂时不要用fast-framework, 是想让大家如何理解 MVC 框架的核心, 以后会带上系列实现文章"

maven-central License
[English Document]

fast-framework

轻量级 Java Web 框架

  • 基于 JDK 8 规范
  • 基于 Servlet 3.0 规范
  • 零配置
  • REST 服务接口 基于 JSON 传输
  • 目前提供 MVC ... 解决方案

作者与学习乐园

源码地址:我的GitHub地址
作者: 李强强 也叫 泥瓦匠
QQ群:编程之美 365234583 立即加入
欢迎阅读以下博文:
Fast-FrameWork系列文章:传送门

快速入门

1. 必备环境

2. 下载 fast-framework 项目及 sample 案例

git clone https://github.com/JeffLi1993/fast-framework.git

3. Maven 编译 sample 案例

cd fast-framework // cd 到工程根目录

mvn clean install // 编译工程

4. 启动 sample 案例

cd fast-sample // cd 到 sample 案例工程根目录
mvn jetty:run  // 启动 sample 工程

Console 出现如下结果,表示服务器成功启动:

...
[INFO] Started ServerConnector@f1a45f8{HTTP/1.1}{0.0.0.0:8080}
[INFO] Started @5133ms
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.

5. 访问 sample

GET 方式

在浏览器中打开 - text/plain; charset=UTF-8 :

GET http://localhost:8080/hello?name=BYSocket

会得到如下结果:
sample结果图

在浏览器中打开 - application/json; charset=UTF-8 :

GET http://localhost:8080/json?name=BYSocket

会得到如下结果:
sample结果图

POST 方式

在 POSTMan 或者 HTTP 客户端 :

POST localhost:8080/user/add HTTP/1.1
Content-Type: application/json
Cache-Control: no-cache
{
    "name":"BYSocket",
    "age":23
}

会得到如下结果:
sample结果图

fast-framework's People

Contributors

jeffli1993 avatar syhily avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.