jboot 1.0-alpha2 发布,一个类似 springboot 的框架

栏目: Java · 发布时间: 7年前

内容简介:jboot 1.0-alpha2 发布,一个类似 springboot 的框架

jboot是一个基于jfinal、undertow开发的一个类似springboot的开源框架, 我们已经在正式的商业上线项目中使用。

jboot-1.0-alpha2更新如下:

修复:jbootrpcService 无法在类上进行注解的bug

修复:在某些情况下无法实例化jbootredis的bug

修复:jfinal-weixin在集群模式下获取ticket错误的问题

新增:添加rpc服务调用统计

新增:@UseHystrixCommand注解,用于controller调用使用Hystrix进行管理(访问隔离、容错隔离、延迟隔离、 熔断)

新增:基于guice的aop功能

新增:jbootmqConfig的默认配置(之前没有配置会出现异常)

新增:mq监听器的多渠监听功能(multiChannel)

优化:jbootrpcService注解的使用

优化:ClassNewer的错误信息

优化:更新jfinal-cos到最新版本"2017.5"

优化:修改JbootEventListner的onMessage为onEvent,防止和mq的onMessage冲突。

以下是hello world:

@UrlMapping(url = "/test")
public class ControllerTest extends JbootController {

    public static void main(String[] args) {
        Jboot.run(args);
    }

    @Inject
    ServiceTest serviceTest ;

    public void index() {
       renderText("hello " + serviceInter.hello());
    }

    @Singleton
    public static class ServiceTest{
        public String hello() {
            return "michael";
        }
    }
}

运行main方法后,访问http://127.0.0.1:8083/test 就能查看到效果了。

如果ServiceTest是一个远程服务,使用@JbootrpcService注解即可。

更多介绍: https://git.oschina.net/fuhai/jboot


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Using Google App Engine

Using Google App Engine

Charles Severance / O'Reilly Media / 2009-5-23 / USD 29.99

With this book, you can build exciting, scalable web applications quickly and confidently, using Google App Engine - even if you have little or no experience in programming or web development. App Eng......一起来看看 《Using Google App Engine》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码