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, thanks!
- Lightweight. The code is simple and structure is clear
- Modular (you can choose which components to use)
- Support plug-in extension mechanism
- Restful style routing interface
- Multiple configuration files support (currently properties, json and coding)
- Eembed jetty server and template engine support
- Support jdk1.6 or higher version
- 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.
To get started, first include the Blade library :
Maven
config:
<dependency>
<groupId>com.bladejava</groupId>
<artifactId>blade-core</artifactId>
<version>last_version</version>
</dependency>
create Main
method like this:
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:
-
- The development of social application platform
-
- Add the test code
-
- Optimize the code base
-
- Optimization of concurrent ability
- Blog:https://biezhi.me
- Mail: biezhi.me#gmail.com
- QQ Group: 1013565
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.