1 Star 0 Fork 175

rongrong2773 / blade

forked from hellokaton / blade 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

Build Status maven-central License @biezhi on weibo

English

Blade是什么?

blade 是一个轻量级的MVC框架. 它拥有简洁的代码,优雅的设计。 如果你喜欢,欢迎 Star and Fork, 谢谢!

特性

  • 轻量级。代码简洁,结构清晰,更容易开发
  • 模块化(你可以选择使用哪些组件)
  • 插件扩展机制
  • Restful风格的路由接口
  • 多种配置文件支持(当前支持properties、json和硬编码)
  • 内置Jetty服务,模板引擎支持
  • 支持JDK1.6或者更高版本

概述

  • 简洁的:框架设计简单,容易理解,不依赖于更多第三方库。Blade框架目标让用户在一天内理解并使用。
  • 优雅的:blade 支持 REST 风格路由接口, 提供 DSL 语法编写,无侵入式的拦截器。

快速入门

开始之前,首先 引入Blade的库文件

Maven 配置:

<dependency>
	<groupId>com.bladejava</groupId>
	<artifactId>blade-core</artifactId>
	<version>最终版本</version>
</dependency>

编写 Main函数:

public class App {
		
	public static void main(String[] args) {
		Blade blade = Blade.me();
		blade.get("/", (request, response) -> {
			response.html("<h1>Hello blade!</h1>");
		});
		blade.listen(9001).start();
	}
}

用浏览器打开 http://localhost:9001 这样就可以看到第一个Blade应用了!

OK,这一切看起来多么的简单,查阅使用指南更多现成的例子供你参考:

计划

    1. 开发社交应用平台
    1. 添加测试代码
    1. 优化基础代码
    1. 优化并发能力

更新日志

更新日志

联系我

开源协议

Copyright 2015 biezhi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
[![](https://dn-biezhi.qbox.me/LOGO_BIG.png)](http://bladejava.com) [![Build Status](https://img.shields.io/travis/biezhi/blade.svg?style=flat-square)](https://travis-ci.org/biezhi/blade) [![maven-central](https://img.shields.io/maven-central/v/com.bladejava/blade-core.svg?style=flat-square)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.bladejava%22) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html) [![@biezhi on weibo](https://img.shields.io/badge/weibo-%40biezhi-red.svg?style=flat-square)](http://weibo.com/u/5238733773) [中文](https://github.com/biezhi/blade/blob/master/README_CN.md) ## What Is Blade? `blade` is a lightweight MVC framework. It is based on the principles of simplicity and elegance. If you like it, can be [Star and Fork](https://github.com/biezhi/blade), thanks! ## Features * [x] Lightweight. The code is simple and structure is clear * [x] Modular (you can choose which components to use) * [x] Support plug-in extension mechanism * [x] Restful style routing interface * [x] Multiple configuration files support (currently properties, json and coding) * [x] Eembed jetty server and template engine support * [x] Support jdk1.6 or higher version ## Overview * Simplicity. The design is simple, easy to understand and doesn't introduce many layers between you and the standard library. It is a goal of the project that users should be able to understand the whole framework in a single day. * Elegance. `blade` Support the REST style routing interface, provide DSL grammar to write, no invasive interceptors. ## Getting started To get started, first [include the Blade library](http://bladejava.com/docs/intro/getting_start) : `Maven` config: ```sh <dependency> <groupId>com.bladejava</groupId> <artifactId>blade-core</artifactId> <version>last_version</version> </dependency> ``` create `Main` method like this: ```java public class App { public static void main(String[] args) { Blade blade = Blade.me(); blade.get("/", (request, response) -> { response.html("<h1>Hello blade!</h1>"); }); blade.listen(9001).start(); } } ``` Run it and point your browser to http://localhost:9001. There you go, you've just created your first Blade app! OK, all this may seem simple, refer to the guidelines for use more ready-made examples for your reference: + [HELLO](https://github.com/bladejava/hello) + [API DOCS](http://bladejava.com/apidocs/) + [USE GUIDE](https://github.com/biezhi/blade/wiki) + [EXAMPLES](https://github.com/bladejava) + [VERSION](LAST_VERSION.md) ## Plan - 1. The development of social application platform - 2. Add the test code - 3. Optimize the code base - 4. Optimization of concurrent ability ## Update [update log](https://github.com/biezhi/blade/blob/master/UPDATE_LOG.md) ## Contact - Blog:[https://biezhi.me](https://biezhi.me) - Mail: biezhi.me#gmail.com - QQ Group: [1013565](http://shang.qq.com/wpa/qunwpa?idkey=932642920a5c0ef5f1ae902723c4f168c58ea63f3cef1139e30d68145d3b5b2f) ## licenses ``` Copyright 2015 biezhi Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ```

简介

blade 是一个简洁强大的web框架,它内置了IOC管理,拦截器配置,REST API开发等众多主流web特性,集成了模板引擎,缓存插件,数据库操作,邮件发送,HTTP请求等常用功能 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rongrong2773/blade.git
git@gitee.com:rongrong2773/blade.git
rongrong2773
blade
blade
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891