同步操作将从 hellokaton/blade 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#Blade
blade Is a concise and powerful web development framework, it is built into the IOC
administration, the interceptor configuration, REST API
development and so on many mainstream web features, integrate the template engine, a cache plug-in, database operations, commonly used functions such as email, concise source deserves your reading. If you like it, can be Star or Fork
, thanks!
First. Use maven to build a webapp, join dependency on the blade,Recommended for the latest version
<dependency>
<groupId>com.bladejava</groupId>
<artifactId>blade-core</artifactId>
<version>1.2.1</version>
</dependency>
Second. Configuration in the web.xml
Blade core filter initialization and set your class, and you can also not configuration(using jetty start)
<web-app>
<display-name>Archetype Created Web Application</display-name>
<filter>
<filter-name>BladeFilter</filter-name>
<filter-class>blade.BladeFilter</filter-class>
<init-param>
<param-name>applicationClass</param-name>
<param-value>blade.sample.App</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>BladeFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
Third. Write App.java and routing file, here is an example
public class App extends BladeApplication{
Logger logger = Logger.getLogger(App.class);
@Override
public void init() {
// Set up routing and interceptor bag in bag
Blade.defaultRoute("blade.sample");
}
}
@Path("/")
public class Hello {
@Route("hello")
public String hello() {
System.out.println("hello");
return "hello.jsp";
}
@Route(value = "post", method = HttpMethod.POST)
public void post(Request request) {
String name = request.query("name");
System.out.println("name = " + name);
}
@Route("users/:name")
public ModelAndView users(Request request, Response response) {
System.out.println("users");
String name = request.pathParam(":name");
ModelAndView modelAndView = new ModelAndView("users");
modelAndView.add("name", name);
return modelAndView;
}
@Route("index")
public String index(Request request) {
request.attribute("name", "jack");
return "index.jsp";
}
}
OK, all this may seem simple, refer to the guidelines for use more ready-made examples for your reference:
1. Perfect the documents
2. Complete with `blade` single-user blog system development
3. Write English document
4. Optimize the code performance
1. Update Bug fix sql2o
2. Remove the blade-kit useless class
3. Add email support
4. Add a program timing
5. Add the HTTP request support network
6. Optimization of the built-in logging output
7. Add tasks to support regularly
8. Reconstruction project structure
1. Remove excess public methods
2. Add the `Blade.run()` run jetty
3. Add the `Blade.register()` method register bean object
4. Optimize the ioc object management
5. Add initialization to monitor the context
6. Optimize the underlying IO
7. Simplify the plug-in extension
8. Matching vehicle routing separation
9. Repair jetty in running maven environment more bugs
10. Optimize the file upload
11. Optimized matching routing
12. Add methods perform monitoring
13. Add cache support
The first stable release
Blade Framework based on the Apache2 License
OSC Blog:http://my.oschina.net/biezhi
Mail: biezhi.me#gmail.com
QQ Group: 1013565
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。