Jboot v3.0-rc.2 發佈,全新的 Jboot 版本

Jboot 是一個基於 JFinal、JFinal-Undertow、Dubbo 等開發的微服務框架,幫助開發者降低微服務開發門檻。同時完美支持在 idea、eclipse 下多 maven 模塊,對 java 代碼、html、css、js 等資源文件進行熱加載。爽爽開發,快樂生活。


PS : Jboot 3.0 版本是一個全新的版本,2.x 可以無縫升級到 3.0。


3.0 主要是升級 Dubbo 到 Apache 最新版本、升級 Sharding-JDBC 到 Apache 最新版本,升級分佈式事務 Seata 到最新版本,新增 Sentinel 分佈式限流降級的支持、新增對 nacos、Apollo 等分佈式配置的支持。

rc.2 最大的特點是新增了 join 操作,比如在 UserService 中,可以如下進行查詢:

/***查詢所有用戶,left join 文章表*/public List findList(){   DAO.leftJoin("userArticle").on("user.id = userArticle.user_id")      .rightJoin("...").on(".....")      .findAll()}/*** 根據用戶年齡和文章標題查詢*/public List findListBy(int userAge,String articleTitle){   DAO.leftJoin("userArticle").on("user.id = userArticle.user_id")      .rightJoin("...").on(".....")      .findByColumns(Columns.create().ge("user.age",userAge).like("userArticle.title",articleTitle))}


Jboot v3.0.0-rc.2 更新內容如下:


  • - 新增:添加 Join 的 sql 查詢操作
  • - 新增:新增 Columns 的 string() 方法,方便自由添加相應的 sql
  • - 優化:完善對 Sentinel 的相關測試
  • - 優化:重命名 IJbootModelDialect 為 JbootDialect
  • - 優化:重命名 Columns 的相關方法:not_in() 為 notIn() 、 is_null() 為 isNull() 、 is_not_null() 為 isNotNull()
  • - 優化:重命名 DialectKit 為 SqlBuilder
  • - 優化:升級Jboot的相關依賴 - sharding-jdbc:4.0.0 - metrics:4.1.2 - guava:28.2 - HikariCP:3.4.2


Jboot v3.0-rc.2 發佈,全新的 Jboot 版本


maven 依賴:

    io.jboot    jboot    3.0.0-rc.2

Hello World:

@RequestMapping("/")public class HelloworldController extends JbootController {    public void index(){        renderText("hello world");    }    public static void main(String[] args){        JbootApplication.run(args);    }}

碼雲地址:https://gitee.com/fuhai/jboot

文章轉載自 OSCHINA 社區 [http://www.oschina.net]

本文標題:Jboot v3.0-rc.2 發佈,全新的 Jboot 版本

本文地址:https://www.oschina.net/news/113130/jboot-3-rc2-released


分享到:


相關文章: