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 中,可以如下进行查询:
public List<User> findList(){
DAO.leftJoin("userArticle").on("user.id = userArticle.user_id")
.rightJoin("...").on(".....")
.findAll()
}
public List<User> 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
maven 依赖:
<dependency>
<groupId>io.jboot</groupId>
<artifactId>jboot</artifactId>
<version>3.0.0-rc.2</version>
</dependency>
Hello World:
@RequestMapping("/")
public class HelloworldController extends JbootController {
public void index(){
renderText("hello world");
}
public static void main(String[] args){
JbootApplication.run(args);
}
}
|