增加了分析模拟系统模块框架
This commit is contained in:
parent
48bca56d15
commit
63d41e11a6
12
business-css/README.md
Normal file
12
business-css/README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# business-css
|
||||
|
||||
临界事故情景分析模拟系统(业务模块)。
|
||||
|
||||
- 引用 `framework` 公共模块:依赖坐标 `com.yfd:platform:1.0:jar:plain`
|
||||
- 提供基础 REST 接口:`/api/simulation/ping` 与 `/api/simulation/run`
|
||||
- 运行方式:在项目根目录执行 `mvn -DskipTests spring-boot:run -pl business-css`
|
||||
|
||||
## 开发约定
|
||||
- 统一使用 JDK 17
|
||||
- 数据库连接在 `application.yml` 中配置,可根据环境覆盖
|
||||
- 与框架的通用工具、模型、常量等直接通过依赖引入使用
|
||||
64
business-css/docs/分析模拟系统方案.md
Normal file
64
business-css/docs/分析模拟系统方案.md
Normal file
@ -0,0 +1,64 @@
|
||||
# 临界事故情景分析模拟系统方案
|
||||
|
||||
本文档定义业务模块 `business-css` 的目标、架构、数据模型、接口设计与实施计划。
|
||||
|
||||
## 目标
|
||||
- 支撑对“临界事故”相关情景的建模、参数化配置与快速模拟评估。
|
||||
- 与 `framework` 项目共享通用能力(鉴权、缓存、日志、通用工具、数据访问等)。
|
||||
- 提供 REST 接口用于前端或第三方系统的集成。
|
||||
|
||||
## 总体架构
|
||||
- 应用:Spring Boot(JDK 17),模块名 `business-css`。
|
||||
- 依赖:`com.yfd:platform:1.0:jar:plain` 引入框架公共模块。
|
||||
- 数据存储:MySQL(默认 `yfd_platform`,可按环境切换)。
|
||||
- 接口:按 `REST + JSON` 约定,OpenAPI 自动文档可选。
|
||||
|
||||
## 核心域模型(初版)
|
||||
- `Scenario`:事故情景(名称、类型、参数定义、风险等级)。
|
||||
- `IncidentFactor`:影响因子(指标、阈值、权重、取值范围)。
|
||||
- `SimulationRequest`:一次模拟请求(情景名、输入参数)。
|
||||
- `SimulationResult`:模拟输出(状态、关键指标、结论摘要、时间戳)。
|
||||
|
||||
## 关键能力
|
||||
- 参数化建模:基于影响因子提出可配置的情景模板。
|
||||
- 指标计算:利用 `framework` 的通用工具库(如缓存、时间序列、统计)实现。
|
||||
- 场景评估:形成风险等级、预警阈值与应对建议。
|
||||
- 结果持久化:保存模拟结果用于追踪与复盘(后续版本)。
|
||||
|
||||
## 接口草图
|
||||
- `GET /api/simulation/ping`:服务健康检测。
|
||||
- `POST /api/simulation/run`:执行一次模拟,输入 `SimulationRequest`,输出 `SimulationResult`。
|
||||
- 后续:`/api/scenario/*` 用于情景模板的增删改查;`/api/factor/*` 用于影响因子的管理。
|
||||
|
||||
## 数据表(建议)
|
||||
- `css_scenario`:情景基础信息表。
|
||||
- `css_factor`:影响因子表。
|
||||
- `css_simulation_log`:模拟记录表(包含输入与输出摘要)。
|
||||
|
||||
## 与框架的集成
|
||||
- 鉴权与用户上下文:复用 `framework` 的安全模块。
|
||||
- 通用组件:缓存(Caffeine/Redis)、日志、异常统一处理。
|
||||
- 数据访问:沿用 MyBatis/MyBatis-Plus 与统一的分页、审计字段策略。
|
||||
|
||||
## 版本与发布
|
||||
- 业务模块版本:`1.0-SNAPSHOT` 起步;与框架 `1.0` 对齐。
|
||||
- 构建:在仓库根 `pom` 中作为模块聚合;可单独使用 `-pl business-css` 构建或运行。
|
||||
|
||||
## 渐进式实施计划
|
||||
1. 基础骨架搭建(已完成:应用入口、控制器、服务接口与模型)。
|
||||
2. 定义情景与影响因子数据模型,建立数据库表结构与 Mapper。
|
||||
3. 接入框架公共工具,完善指标计算与风险评估逻辑。
|
||||
4. 增加 OpenAPI 文档与前端集成接口规范。
|
||||
5. 引入结果持久化与查询报表。
|
||||
|
||||
## 运维与配置
|
||||
- 端口默认 `8082`,环境覆盖通过 `application.yml` 与外部化配置。
|
||||
- 数据库连接按环境注入(dev/test/prod)。
|
||||
- 日志级别默认 `info`,业务包 `com.yfd` 可设为 `debug`。
|
||||
|
||||
## 安全与合规
|
||||
- 按角色访问控制(复用框架安全),仅授权用户可触发模拟。
|
||||
- 输入校验与审计日志记录,避免非法参数导致资源消耗异常。
|
||||
|
||||
---
|
||||
本文为初版方案,后续将结合具体需求与数据约束逐步细化与调整。
|
||||
81
business-css/pom.xml
Normal file
81
business-css/pom.xml
Normal file
@ -0,0 +1,81 @@
|
||||
<?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>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.yfd</groupId>
|
||||
<artifactId>business-css</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>business-css</name>
|
||||
<description>临界事故情景分析模拟系统(业务模块)</description>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring Boot core -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringDoc OpenAPI (optional for API docs) -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据访问(根据需要选择) -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 引用 framework 公共模块(使用 plain classifier 提供的 classes jar) -->
|
||||
<dependency>
|
||||
<groupId>com.yfd</groupId>
|
||||
<artifactId>platform</artifactId>
|
||||
<version>1.0</version>
|
||||
<classifier>plain</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- 测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@ -0,0 +1,11 @@
|
||||
package com.yfd.business.css;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class CriticalScenarioApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CriticalScenarioApplication.class, args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.yfd.business.css.controller;
|
||||
|
||||
import com.yfd.business.css.model.SimulationRequest;
|
||||
import com.yfd.business.css.model.SimulationResult;
|
||||
import com.yfd.business.css.service.SimulationService;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/simulation")
|
||||
public class SimulationController {
|
||||
|
||||
private final SimulationService simulationService;
|
||||
|
||||
public SimulationController(SimulationService simulationService) {
|
||||
this.simulationService = simulationService;
|
||||
}
|
||||
|
||||
@GetMapping("/ping")
|
||||
public ResponseEntity<String> ping() {
|
||||
return ResponseEntity.ok("business-css simulation service is up");
|
||||
}
|
||||
|
||||
@PostMapping("/run")
|
||||
public ResponseEntity<SimulationResult> run(@RequestBody SimulationRequest request) {
|
||||
SimulationResult result = simulationService.runSimulation(request);
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.yfd.business.css.model;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class SimulationRequest {
|
||||
private String scenarioName;
|
||||
private Map<String, Object> parameters;
|
||||
|
||||
public String getScenarioName() {
|
||||
return scenarioName;
|
||||
}
|
||||
|
||||
public void setScenarioName(String scenarioName) {
|
||||
this.scenarioName = scenarioName;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setParameters(Map<String, Object> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.yfd.business.css.model;
|
||||
|
||||
public class SimulationResult {
|
||||
private String scenarioName;
|
||||
private String startTime;
|
||||
private String status;
|
||||
private String summary;
|
||||
|
||||
public String getScenarioName() {
|
||||
return scenarioName;
|
||||
}
|
||||
|
||||
public void setScenarioName(String scenarioName) {
|
||||
this.scenarioName = scenarioName;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
package com.yfd.business.css.service;
|
||||
|
||||
import com.yfd.business.css.model.SimulationRequest;
|
||||
import com.yfd.business.css.model.SimulationResult;
|
||||
|
||||
public interface SimulationService {
|
||||
SimulationResult runSimulation(SimulationRequest request);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.yfd.business.css.service.impl;
|
||||
|
||||
import com.yfd.business.css.model.SimulationRequest;
|
||||
import com.yfd.business.css.model.SimulationResult;
|
||||
import com.yfd.business.css.service.SimulationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Service
|
||||
public class SimulationServiceImpl implements SimulationService {
|
||||
@Override
|
||||
public SimulationResult runSimulation(SimulationRequest request) {
|
||||
// TODO: 引入 framework 公共模块的算法与工具进行真实计算
|
||||
SimulationResult result = new SimulationResult();
|
||||
result.setScenarioName(request.getScenarioName());
|
||||
result.setStartTime(Instant.now().toString());
|
||||
result.setStatus("SUCCESS");
|
||||
result.setSummary("占位结果:根据输入参数完成快速估算");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
21
business-css/src/main/resources/application.yml
Normal file
21
business-css/src/main/resources/application.yml
Normal file
@ -0,0 +1,21 @@
|
||||
spring:
|
||||
application:
|
||||
name: business-css
|
||||
datasource:
|
||||
url: jdbc:mysql://43.138.168.68:3306/frameworkdb2023?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: ylfw20230626@
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jackson:
|
||||
time-zone: Asia/Shanghai
|
||||
date-format: yyyy-MM-dd'T'HH:mm:ssXXX
|
||||
|
||||
server:
|
||||
port: 8082
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com.yfd: debug
|
||||
BIN
business-css/target/business-css-1.0-SNAPSHOT.jar
Normal file
BIN
business-css/target/business-css-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
business-css/target/business-css-1.0-SNAPSHOT.jar.original
Normal file
BIN
business-css/target/business-css-1.0-SNAPSHOT.jar.original
Normal file
Binary file not shown.
21
business-css/target/classes/application.yml
Normal file
21
business-css/target/classes/application.yml
Normal file
@ -0,0 +1,21 @@
|
||||
spring:
|
||||
application:
|
||||
name: business-css
|
||||
datasource:
|
||||
url: jdbc:mysql://43.138.168.68:3306/frameworkdb2023?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: ylfw20230626@
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
jackson:
|
||||
time-zone: Asia/Shanghai
|
||||
date-format: yyyy-MM-dd'T'HH:mm:ssXXX
|
||||
|
||||
server:
|
||||
port: 8082
|
||||
servlet:
|
||||
context-path: /
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: info
|
||||
com.yfd: debug
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3
business-css/target/maven-archiver/pom.properties
Normal file
3
business-css/target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,3 @@
|
||||
artifactId=business-css
|
||||
groupId=com.yfd
|
||||
version=1.0-SNAPSHOT
|
||||
@ -0,0 +1,6 @@
|
||||
com\yfd\business\css\CriticalScenarioApplication.class
|
||||
com\yfd\business\css\service\impl\SimulationServiceImpl.class
|
||||
com\yfd\business\css\controller\SimulationController.class
|
||||
com\yfd\business\css\model\SimulationRequest.class
|
||||
com\yfd\business\css\model\SimulationResult.class
|
||||
com\yfd\business\css\service\SimulationService.class
|
||||
@ -0,0 +1,6 @@
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\controller\SimulationController.java
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\CriticalScenarioApplication.java
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\model\SimulationRequest.java
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\model\SimulationResult.java
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\service\impl\SimulationServiceImpl.java
|
||||
D:\JavaProjectSpace\business-css\src\main\java\com\yfd\business\css\service\SimulationService.java
|
||||
72
maven编译打包安装说明.md
Normal file
72
maven编译打包安装说明.md
Normal file
@ -0,0 +1,72 @@
|
||||
# Maven 编译、打包、安装说明
|
||||
|
||||
本文档说明在本仓库根目录下进行项目的编译、打包与安装的常用操作命令。适用于聚合构建(包含 `framework` 与 `business-css` 两个模块)。
|
||||
|
||||
## 环境要求
|
||||
- JDK:`17`
|
||||
- Maven:`3.6.3+`(推荐 `3.8+`)
|
||||
- 操作系统:Windows(命令在 PowerShell 下执行)
|
||||
|
||||
## 项目结构(聚合)
|
||||
- 根 `pom.xml`:`packaging=pom`,聚合模块
|
||||
- 模块 `framework`(artifact:`com.yfd:platform:1.0`)
|
||||
- 模块 `business-css`(artifact:`com.yfd:business-css:1.0-SNAPSHOT`)
|
||||
|
||||
## 常用全局构建
|
||||
- 清理并打包所有模块(跳过测试):
|
||||
- `mvn -DskipTests clean package`
|
||||
- 清理并安装到本地仓库(跳过测试):
|
||||
- `mvn -DskipTests clean install`
|
||||
|
||||
## 仅构建某个模块
|
||||
- 仅构建 `framework`:
|
||||
- `mvn -DskipTests clean package -pl framework`
|
||||
- 仅安装 `framework` 到本地仓库:
|
||||
- `mvn -DskipTests install -pl framework`
|
||||
- 仅构建 `business-css`,并自动构建其依赖:
|
||||
- `mvn -DskipTests clean package -pl business-css -am`
|
||||
- 仅安装 `business-css` 到本地仓库:
|
||||
- `mvn -DskipTests install -pl business-css -am`
|
||||
|
||||
## 运行业务模块(开发)
|
||||
- 在根目录运行 `business-css`:
|
||||
- `mvn -DskipTests spring-boot:run -pl business-css`
|
||||
- 运行后默认端口 `8082`:`http://localhost:8082`
|
||||
|
||||
## 产物位置说明
|
||||
- `framework` 模块打包产物(位于 `d:\JavaProjectSpace\framework\target\`):
|
||||
- 可执行(经 `spring-boot-maven-plugin` 重打包)Jar:`platform-1.0.jar`(名称可能包含时间戳或 SNAPSHOT)
|
||||
- 附加 classes Jar(用于业务模块依赖):`platform-1.0-plain.jar`
|
||||
- `business-css` 模块打包产物(位于 `d:\JavaProjectSpace\business-css\target\`):
|
||||
- 可执行 Jar:`business-css-1.0-SNAPSHOT.jar`
|
||||
|
||||
## 本地 Maven 仓库位置(Windows)
|
||||
- `D:\maven-repository`
|
||||
- 安装命令执行成功后,相关坐标将被写入该目录:
|
||||
- `com\yfd\platform\1.0\platform-1.0-plain.jar`
|
||||
- `com\yfd\platform\1.0\platform-1.0.jar`
|
||||
- `com\yfd\business-css\1.0-SNAPSHOT\business-css-1.0-SNAPSHOT.jar`
|
||||
|
||||
## 业务模块对框架的依赖
|
||||
- `business-css/pom.xml` 引用框架的公共 classes Jar:
|
||||
- 坐标:`com.yfd:platform:1.0:jar:plain`
|
||||
- 构建方式一:先构建 `framework` 再构建 `business-css`
|
||||
- `mvn -DskipTests clean package -pl framework`
|
||||
- `mvn -DskipTests clean package -pl business-css -am`
|
||||
- 构建方式二:在根目录一次性构建所有模块
|
||||
- `mvn -DskipTests clean package`
|
||||
|
||||
## 常见问题与提示
|
||||
- 如果出现依赖解析失败,优先执行 `install` 将产物写入本地仓库:
|
||||
- `mvn -DskipTests clean install`
|
||||
- 版本号与快照:业务模块当前为 `1.0-SNAPSHOT`,框架为 `1.0`
|
||||
- 代理/网络:如需远程仓库依赖,确保 Maven 设置(`settings.xml`)配置正确
|
||||
- 清理构建缓存:
|
||||
- `mvn clean`
|
||||
|
||||
## 验证服务可用性
|
||||
- 健康检查:`GET http://localhost:8082/api/simulation/ping`
|
||||
- 模拟执行:`POST http://localhost:8082/api/simulation/run`
|
||||
|
||||
---
|
||||
以上命令均在仓库根目录执行。若需在 CI 中使用,请根据环境变量与缓存策略调整 `-DskipTests` 与并发参数。
|
||||
24
pom.xml
Normal file
24
pom.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?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>
|
||||
|
||||
<groupId>com.yfd</groupId>
|
||||
<artifactId>java-project-repo</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>JavaProjectRepo</name>
|
||||
<description>Parent aggregator for framework and business modules</description>
|
||||
|
||||
<modules>
|
||||
<module>framework</module>
|
||||
<module>business-css</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
@ -89,3 +89,35 @@
|
||||
|
||||
---
|
||||
如需自动化执行“从 main-framework 合并到当前分支”,请确保工作区干净并已配置远端,然后按上文标准步骤执行即可。
|
||||
|
||||
## 自动化合并脚本
|
||||
- 脚本位置:`D:\JavaProjectSpace\scripts\merge-main-framework.ps1`
|
||||
- 作用:自动执行从 `origin/main-framework` 合并到当前分支的流程,包含工作区检查、自动暂存(可选)、`fetch`、合并、冲突策略与推送。
|
||||
|
||||
参数说明:
|
||||
- `-RepoPath`:仓库路径,默认为脚本所在目录的上一级。
|
||||
- `-AutoStash`:当工作区不干净时自动执行 `git stash push -u`,默认 `true`。
|
||||
- `-Push`:合并成功后是否推送到远端,默认 `true`。
|
||||
- `-OnConflict`:冲突策略,`abort` 立即中止并恢复现场,`leave` 保留冲突现场供手动解决,默认 `leave`。
|
||||
|
||||
使用示例:
|
||||
```powershell
|
||||
# 常用:自动暂存 + 推送,冲突保留现场
|
||||
& "D:\JavaProjectSpace\scripts\merge-main-framework.ps1" -AutoStash $true -Push $true -OnConflict 'leave'
|
||||
|
||||
# 冲突直接中止合并(不会生成合并提交)
|
||||
& "D:\JavaProjectSpace\scripts\merge-main-framework.ps1" -OnConflict 'abort'
|
||||
|
||||
# 禁止自动暂存,需确保工作区干净
|
||||
& "D:\JavaProjectSpace\scripts\merge-main-framework.ps1" -AutoStash $false
|
||||
```
|
||||
|
||||
退出码约定:
|
||||
- `0`:合并(及推送)成功。
|
||||
- `2`:存在冲突且策略为 `leave`,保留现场供手动解决(按提示执行 `git add` / `git commit`)。
|
||||
- `1`:命令执行错误或远端分支不存在等异常。
|
||||
|
||||
注意事项:
|
||||
- 需本机安装并可用 `git` 命令。
|
||||
- 远端分支固定为 `origin/main-framework`,如远端名不同请调整脚本或配置。
|
||||
- 合并完成后建议在后端与前端分别执行构建验证,确保配置与依赖同步。
|
||||
Loading…
Reference in New Issue
Block a user