P1-2 第一步:framework com.dsasp.server.core 17 文件移植 + 缺失 common 依赖回填。
引擎(core):FlowExcuteServiceImpl(534 行,服务流执行入口)+ FlowServiceImpl
(流定义加载/默认流生成)+ flow/model 8 个(Flow/Node/Field/Procedure/Script/
ServiceBean/Start/End/Transition + BaseFlowConvert/DefaultFlowHelper)+
service/script(ScriptingEnginesManager/FlowScriptBindings)+ origin(OriginServiceManagerImpl)。
OSGi Activator.java 不移植(纯 BundleActivator/sun.awt,JDK17 不可用;
等价能力已由 SpringBeanOsgiServices @Component + 组件扫描接管,见迁移手册 §3.1)。
缺失 common 依赖回填(framework 原样):core.ControlBean/FlowDefinition、
core.service.{FlowExcuteService,FlowService,OriginServiceManager}、
util.{AopTargetUtils,ExceptionUtil}、privilege.service.FlowPrivilegeService。
函数库回迁:GetValueFunction/GetDefaultValueFunction 以 framework 原版 Groovy
回迁(替换 PoC 空桩,依赖均已就位,gmavenplus 联合编译);GetServicesFunction
保包名/类名/签名,回迁引擎执行路径实际调用的 findCount/loadPOJO/listSelect
三方法(其余 @Function 依赖 P2/P3 横切服务,届时补全)。
FlowPrivilegeService:framework 原样移植(FlowPrivilegeServiceImpl + ServicePrivilege)
入保真层 com.dsasp.server.privilege.service。
API 断点修复(迁移手册 §2 同款):FlowServiceImpl 移除 JDK 内部 import
com.sun.xml.internal.*(原版未用)、queryForInt→queryForObject;Flow.java
dom4j 2.x selectNodes 返回 List<Node> 加 unchecked 转型(14 处)。
ScriptingEnginesManager 的 activiti JuelScriptEngineFactory 适配为 JSR-223 惰性
注册(架构纪律:activiti/Flowable 不进保真层;线性查询/报表流不走 juel)。
mvn compile/test 通过,ArchUnit(保真层禁依赖现代层)仍绿。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
64 lines
4.1 KiB
XML
64 lines
4.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>com.eip4</groupId>
|
|
<artifactId>eip4-platform</artifactId>
|
|
<version>0.1.0-SNAPSHOT</version>
|
|
</parent>
|
|
<artifactId>platform-legacy-core</artifactId>
|
|
<name>platform-legacy-core</name>
|
|
<description>保真层:移植引擎原样,包名 com.dsasp.* 不动。对拍=完成定义,与 framework 源码 diff 保持最小</description>
|
|
<dependencies>
|
|
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency>
|
|
<dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId></dependency>
|
|
<dependency><groupId>org.dom4j</groupId><artifactId>dom4j</artifactId></dependency>
|
|
<dependency><groupId>jaxen</groupId><artifactId>jaxen</artifactId></dependency>
|
|
<dependency><groupId>org.apache.groovy</groupId><artifactId>groovy-jsr223</artifactId></dependency>
|
|
<dependency><groupId>joda-time</groupId><artifactId>joda-time</artifactId></dependency>
|
|
<dependency><groupId>org.json</groupId><artifactId>json</artifactId></dependency>
|
|
<!-- P1-4:CCache 内部实现换 Caffeine(接替极简 HashMap 版),语义=进程内本地缓存。
|
|
版本走 Spring Boot BOM(3.1.8)。公共签名不变,call site 零改动。架构第三节留口:
|
|
多实例横扩时走 Spring Cache 抽象换 Redis——见 P1加固实测报告对该条款的差距说明。 -->
|
|
<dependency><groupId>com.github.ben-manes.caffeine</groupId><artifactId>caffeine</artifactId></dependency>
|
|
<!-- C2 数据权限:DataFilterHelper 用 org.codehaus.jackson(Jackson 1.x)做 FILTERRULE JSON 互转,
|
|
与 framework 原版一致(原样移植,不改 Jackson 2);传递依赖 jackson-core-asl -->
|
|
<dependency><groupId>org.codehaus.jackson</groupId><artifactId>jackson-mapper-asl</artifactId></dependency>
|
|
<dependency><groupId>jakarta.servlet</groupId><artifactId>jakarta.servlet-api</artifactId><scope>provided</scope></dependency>
|
|
<!-- C2 单测:DataFilterHelper JSON 互转 + getWhereClause 拼接(纯逻辑,假 POJOInfo) -->
|
|
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- P1 服务流引擎:framework 函数库 GetValueFunction/GetDefaultValueFunction 与
|
|
SecureGroovyScriptEngineFactory/MethodCallExpressionChecker 为 .groovy 源码
|
|
(原样移植,见 src/main/groovy),需 Groovy 联合编译为字节码,运行时脚本方可按
|
|
FQN import。gmavenplus 在 compile 阶段编译 src/main/groovy,与 javac 联合。 -->
|
|
<plugin>
|
|
<groupId>org.codehaus.gmavenplus</groupId>
|
|
<artifactId>gmavenplus-plugin</artifactId>
|
|
<version>3.0.2</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<!-- generateStubs 在 javac 前产出 Java 桩,使 com.dsasp.* 的 .java
|
|
可引用 .groovy 类(GetValueFunction 等);compile 再产出真实字节码。 -->
|
|
<goal>addSources</goal>
|
|
<goal>addTestSources</goal>
|
|
<goal>generateStubs</goal>
|
|
<goal>compile</goal>
|
|
<goal>generateTestStubs</goal>
|
|
<goal>compileTests</goal>
|
|
<goal>removeStubs</goal>
|
|
<goal>removeTestStubs</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|