chore: 落地 eip4-platform 多模块骨架基线(PoC→工程化)
从 eip4-poc 迁入双层制模块化单体:保真层 platform-legacy-core (com.dsasp 引擎原样)+ 现代层 platform-metadata/auth/flow-gateway/ converter/ai + platform-app 启动器。ArchUnit 纪律固化(保真层禁依赖现代层)。 此为 C1 对拍工作的编译通过基线。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.eip4.platform.app;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* EIP3 路线 A' PoC(WS1):POJOCRUDService/POJOService 元数据引擎
|
||||
* 从 OSGi/Spring 3.1/JDK 6 移植到 Spring Boot 3 / JDK 17 的验证工程。
|
||||
* 扫描范围覆盖移植代码包 com.dsasp 与新代码包 com.eip4.platform。
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {"com.eip4.platform", "com.dsasp"})
|
||||
public class Eip4PlatformApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Eip4PlatformApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.eip4.platform.app.config;
|
||||
|
||||
import org.springframework.beans.factory.SmartInitializingSingleton;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.fasterxml.jackson.datatype.joda.JodaModule;
|
||||
|
||||
import com.dsasp.server.common.log.service.DataOperatorLog;
|
||||
import com.dsasp.server.common.log.service.SystemLogManager;
|
||||
import com.dsasp.server.dataDic.service.POJOCRUDServiceImpl;
|
||||
import com.dsasp.server.dataDic.service.POJOServiceImpl;
|
||||
|
||||
/**
|
||||
* 等价替代原 com.dsasp.server.dataDic/META-INF/spring/service.xml 的
|
||||
* <property> setter 装配:systemLogManager / dataOperatorLog 在旧代码中
|
||||
* 不是 @Autowired 字段,而是 XML 注入。这里集中补齐,旧类零修改。
|
||||
*/
|
||||
@Configuration
|
||||
public class LegacyXmlWiring implements SmartInitializingSingleton {
|
||||
|
||||
private final POJOCRUDServiceImpl pojoCRUDService;
|
||||
private final POJOServiceImpl pojoService;
|
||||
private final SystemLogManager systemLogManager;
|
||||
private final DataOperatorLog dataOperatorLog;
|
||||
|
||||
public LegacyXmlWiring(POJOCRUDServiceImpl pojoCRUDService,
|
||||
POJOServiceImpl pojoService,
|
||||
SystemLogManager systemLogManager,
|
||||
DataOperatorLog dataOperatorLog) {
|
||||
this.pojoCRUDService = pojoCRUDService;
|
||||
this.pojoService = pojoService;
|
||||
this.systemLogManager = systemLogManager;
|
||||
this.dataOperatorLog = dataOperatorLog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterSingletonsInstantiated() {
|
||||
pojoCRUDService.setSystemLogManager(systemLogManager);
|
||||
pojoService.setSystemLogManager(systemLogManager);
|
||||
pojoService.setDataOperatorLog(dataOperatorLog);
|
||||
}
|
||||
|
||||
/** 引擎字段值含 joda DateTime(CREATETIME 等),Boot 3 需显式注册序列化模块。 */
|
||||
@Bean
|
||||
public JodaModule jodaModule() {
|
||||
return new JodaModule();
|
||||
}
|
||||
}
|
||||
19
platform-app/src/main/resources/application.yml
Normal file
19
platform-app/src/main/resources/application.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
spring:
|
||||
application:
|
||||
name: eip4-poc
|
||||
datasource:
|
||||
url: jdbc:postgresql://192.168.20.68:5435/postgres?currentSchema=eip3
|
||||
username: ceshi
|
||||
password: ceshi
|
||||
hikari:
|
||||
maximum-pool-size: 5
|
||||
# PoC 阶段对共享测试库默认只读,对拍写操作需显式改 false
|
||||
read-only: false
|
||||
|
||||
server:
|
||||
port: 8084
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.dsasp: DEBUG
|
||||
org.springframework.jdbc.core: DEBUG
|
||||
32
platform-app/src/main/resources/static/amis.html
Normal file
32
platform-app/src/main/resources/static/amis.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>eip4-poc · amis 渲染验证</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<!-- amis SDK 锁定 6.13.0(与存档 schema.json 同版本) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/amis@6.13.0/sdk/sdk.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/amis@6.13.0/sdk/helper.css"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/amis@6.13.0/sdk/iconfont.css"/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/amis@6.13.0/sdk/sdk.js"></script>
|
||||
<style>html,body,#root{height:100%;margin:0}</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
(function () {
|
||||
const params = new URLSearchParams(location.search);
|
||||
const template = params.get('template') || '角色维护';
|
||||
fetch('/api/poc/amis-schema?template=' + encodeURIComponent(template))
|
||||
.then(r => r.json())
|
||||
.then(schema => {
|
||||
const amis = amisRequire('amis/embed');
|
||||
amis.embed('#root', schema);
|
||||
})
|
||||
.catch(e => {
|
||||
document.getElementById('root').innerText = '加载 schema 失败: ' + e;
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user