Jboot是一个基于JFinal 和 undertow开发的微服务框架。提供了AOP、RPC、分布式缓存、限流、降级、熔断、统一配置中心、Opentracing数据追踪、metrics数据监控、分布式session、代码生成器、shiro安全控制、swagger api自动生成等功能。 Jboot v1.2.0 主要更新如下:
最重要的是新增了ActionCache类静态页面的高速缓存,而使用ActionCache只需要一个注解即可,代码如下: @RequestMapping("/actionCache")
public class ActionCacheDemo extends JbootController {
@EnableActionCache(group = "test", liveSeconds = 10)
public void test() {
System.out.println("json() invoke!!!!");
setAttr("user", "Michael Yang");
renderJson();
}
} 在以上代码中,当访问 /actionCache/test 的时候,在10秒钟内,无论请求多少次,只有一次访问到 test() 方法,其他请求只返回第一次请求结果,类似静态的文件。 觉得Jboot还不错,请进入 https://gitee.com/fuhai/jboot 点击 star、fork支持。 |