GithubHelp home page GithubHelp logo

earthem / fastchar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from janesengit/fastchar

0.0 0.0 0.0 7.7 MB

Java语言为基础的WEB+ORM开源免费框架,设计原理符合一般Web框架规则。易于学习、代码少、快速上手、零配置,极大的提高开发效率,减少错误率

Home Page: https://www.fastchar.com/

Java 100.00%

fastchar's Introduction

FastChar

FastChar是以Java语言为基础的WEB+ORM开源免费的MVC框架,设计原理符合一般Web框架规则。学习成本低、代码少、极易上手、零配置,极大的提高开发效率,减少错误率。具有高并发、模块化、高灵活性、占用内存少等特点。

Maven搭建项目

第一步:在pom.xml中加入fastchar的maven,如下代码:

<dependency>
    <groupId>com.fastchar</groupId>
    <artifactId>fastchar</artifactId>
    <version>1.0</version>
    <!--最新版本请以前往maven搜索FastChar查看-->
</dependency>

第二步:修改web.xml,将如下代码复制进入

<filter>
    <filter-name>fastchar</filter-name>
    <filter-class>com.fastchar.core.FastFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>fastchar</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

第三步:创建Action并继承FastAction类,如下代码:

public class TestAction extends FastAction {
    /**
    * 获得路由地址
    * Get routing address
    * @return
    */
    @Override
    protected String getRoute() {
        return "/test";
    }

    public void index() {
        responseText("搭建成功!");
    }
}

手动搭建项目

第一步:下载FastChar的jar包,并引用到Web项目中。

第二步:修改web.xml,将如下代码复制进入

<filter>
    <filter-name>fastchar</filter-name>
    <filter-class>com.fastchar.core.FastFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>fastchar</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

第三步:创建Action并继承FastAction类,如下代码:

public class TestAction extends FastAction {
    /**
    * 获得路由地址
    * Get routing address
    * @return
    */
    @Override
    protected String getRoute() {
        return "/test";
    }

    public void index() {
        responseText("搭建成功!");
    }
}

接下来运行项目,访问项目地址即可,例如上述案例中访问的地址:http://xxxx:8080/xxx/test/

框架在线文档

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.