Jboot v3.6.1 released, continue to make efforts to build a distributed ecosystem of JFinal

Jboot is a microservice framework developed based on JFinal, JFinal-Undertow, Dubbo, Seata, Sentinel, ShardingSphere, Nacos, etc., to help developers lower the threshold for microservice development. At the same time, it perfectly supports multiple maven modules under idea and eclipse, and hot-loading resource files such as java code, html, css, js, etc. Shuangshuang development, happy life.

So far, Jboot has been open source for more than 4 years, iterated 160+ versions, and has been used by more than 1,000 companies, including many well-known listed companies.

Jboot V3.6.1 mainly adds new distributed scene classes, JbootLock and JbootCounter.

Generally speaking, in a single project, if we want to synchronize threads, we can add locks to the code, such as using  Synchronized, ReentrantLock, etc. to synchronize the code, but if in a distributed scenario, Synchronized, ReentrantLock It is impossible to praise the application for thread synchronization. Distributed thread synchronization, we also need to write a lot of code to achieve.

In such a scenario, Jboot added  JbootLock to ensure that the local and distributed have consistent characteristics.

E.g:

JbootLock lock = JbootLockManager.me().create("myLock");
try {
    lock.lock();
    
    do_your_something();


}finally {
    lock.unlock();
}

Such code can be used normally during the development of a single project. In a distributed scenario, we only need to add the following configuration in jboot.properties.

jboot.object.lock.type = redis

You can normally let JbootLock perform "thread synchronization" in applications in a distributed scenario.

JbootCounter is a counter that has the same characteristics as JbootLock and can be switched through configuration in local and distributed scenarios.

Jboot mainly has the following characteristics:

  • 1. Rapid development of MVC + ORM based on JFinal
  • 2. Based on ShardingSphere + Seata distributed transaction and sub-database sub-table
  • 3. RPC implementation based on Dubbo or Motan
  • 4. Sentinel-based distributed current limiting and degradation
  • 5. Distributed configuration center based on Apollo and Nacos
  • 6. Distributed secondary cache based on EhCache and Redis

Jboot v3.6.0 updates are as follows:

  • New: JbootCaptchaCache facilitates verification code verification in distributed scenarios
  • New: JbootTokenCache facilitates token verification under distributed conditions
  • New: JbootLock, which is convenient for writing the lock mechanism in the distributed model in local mode
  • Optimization: Added support for empty string "" configuration in RequestMapping annotation.
  • Optimization: Mobile package name of JbootAccessTokenCache, optimizer for WeChat development in distributed scenarios
  • Optimization: Refactor JbootCounter to have consistent characteristics in a single model and a distributed scenario

Development documents:

https://jbootprojects.gitee.io/docs/

At the same time, Jboot officially launched the enterprise-level development framework JbootAdmin, details  https://jbootprojects.gitee.io/docs/jbootadmin/

maven dependency:

<dependency>
    <groupId>io.jboot</groupId>
    <artifactId>jboot</artifactId>
    <version>3.6.1</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);
    }
}

Guess you like

Origin www.oschina.net/news/120776/jboot-3-6-1-released