turbo icon indicating copy to clipboard operation
turbo copied to clipboard

:recycle: Decouple project from Spring and MyBatis frameworks for imp…

Open springboot4 opened this issue 1 year ago • 2 comments

概述

改动点:新增turbo-mybatis-plus、turbo-spring-boot-starter模块,将turbo中spring、mybatis等依赖解偶掉。spring、mybatis等依赖作为可选实现供用户引入。用户也可以根据实际情况做不同的实现,例如:solon、jpa等。同时移除掉部分非必需的依赖(例如多数据源依赖)。减轻了项目依赖,模块化的实现便于后续升级java以及底层组件版本(turbo中spring bot版本还是1.5...)

必要性: turbo定位为轻量级的Java实现的流程引擎,通过内嵌的形式提供给用户使用,通常情况下用户都会与现有的系统进行集成,但是turbo现有实现中强耦合了spring以及mybatis,导致用户在使用过程中出现与现有系统不兼容的情况,例如: 期待一个脱离Springboot框架的完全独立的,可用在其他框架上的turboturbo是否只支持mysql 、 高度偶和的架构实现带来了众多问题,例如底层组件升级上的困难,例如: JDK17不兼容报错目前不支持springboot3请求支持JDK 17,或者提供在JDK 17中运行的替代方案

是否经过测试:本地jdk8环境经过完整测试。

以下是github copilot生成的变更描述,仅供参考:

This pull request includes various changes across multiple files to improve the configuration, dependencies, and code structure of the project. The most important changes include the use of placeholders for versioning, updates to dependency imports, and modifications to the database configuration.

Dependency and Configuration Updates:

  • demo/pom.xml: Replaced hardcoded version numbers with ${revision} placeholders for better version management. Updated the turbo.engine.version property and added new dependencies.
  • engine/pom.xml: Replaced hardcoded version numbers with ${revision} placeholders and updated dependencies, including removal of several Spring Boot dependencies and addition of commons-beanutils.

Code Refactoring and Imports:

  • demo/src/main/java/com/didiglobal/turbo/demo/DemoApplication.java: Changed import from com.didiglobal.turbo.engine.annotation.EnableTurboEngine to com.didiglobal.turbo.spring.annotation.EnableTurboEngine.
  • demo/src/main/java/com/didiglobal/turbo/demo/service/FlowServiceImpl.java: Updated imports and replaced DAO and entity classes with their mybatis equivalents. [1] [2] [3] [4] [5]

Database Configuration Changes:

  • demo/src/main/resources/application.properties: Simplified the database configuration by removing dynamic datasource settings and updating the MySQL driver class name.
  • demo/src/test/resources/application.properties: Removed H2 database configuration and related properties.

Test Enhancements:

  • demo/src/test/java/com/didiglobal/turbo/demo/FlowControllerTest.java: Added method calls to ensure proper flow creation, saving, and deployment in the test methods. [1] [2] [3] [4]

Code Cleanup:

  • engine/src/main/java/com/didiglobal/turbo/engine/common/RedisConstants.java: Removed the RedisConstants class as it was no longer needed.
  • engine/src/main/java/com/didiglobal/turbo/engine/config/BusinessConfig.java: Refactored BusinessConfig from a class to an interface and updated the method signature. [1] [2]

springboot4 avatar Dec 14 '24 12:12 springboot4

parallel-plugin模块视为拓展 本次未做修改

springboot4 avatar Dec 14 '24 12:12 springboot4

请问下这个分支计划什么时候合并到主干?近期打算集成这个turbo,你这个分支很多特性是我们需要的,希望能合并到主干

gannyee avatar May 06 '25 03:05 gannyee