P2-3: 横切服务桩换 framework 真实现(文件/日志/消息)
保真层原样移植三块横切服务,删除对应桩,bean 名/包名/签名不动: - 文件 com.dsasp.server.file.*:FileServiceImpl(bean fileService)真实现, 存储后端经替换类 FTPClientTemplate(保包名/类名/签名,FTP→本地盘, 根目录 eip4.file.root 配置化默认 ./data/files,resolveSafe 防 ../ 逃逸); BASE64Decoder→java.util.Base64、ant zip→java.util.zip、commons-codec→MessageDigest。 - 日志 com.dsasp.server.log.*:SystemLogManagerImpl/DataOperatorLogger/ DataLogRecorderImpl + 异步调度(DataLogManager/ProcessLogThread/ProcessSysLogThread) 原样移植,落 SYS_LOG/SYS_DATA_LOG/SYS_DATA_LOGITEM(后者 insert-only 无审计列,§5.1)。 - 消息 com.dsasp.server.mail.*:SystemEmailServiceImpl + SystemEmail/SystemEmailService 移植;SMTP 配置缺省时降级 no-op + WARN,不阻塞启动(§5.38)。 装配/配置/自举/验证: - LegacyXmlWiring 等价补齐三处 jdbcTemplate setter + MainApp.destPath 注入(§4.1); - application.yml 加 eip4.file.root;bootstrap-xservice.sql 自举四张横切表 + LOGLEVEL; - 删除 StubFileService/StubSystemLogManager/StubDataOperatorLog(StubProjectSwitchService 属 viewframework 域非本任务范畴,保留); - 单测 12 + 本地 DB 集成 4,全模块 mvn clean test 绿(含 ArchUnit);8087 启动验证毕已 kill。 报告:platform-auth/P2横切服务实测报告.md;坑入 docs/迁移手册.md §3.1/§3.2/§5.36-5.38。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.dataDic.bean.GeneralPOJO;
|
||||
import com.dsasp.server.common.log.bean.DataLogItem;
|
||||
import com.dsasp.server.common.log.service.DataOperatorLog;
|
||||
|
||||
/**
|
||||
* WS1 桩:数据操作审计日志。原版写库记录字段级变更,PoC 降级为 slf4j。
|
||||
*/
|
||||
@Service("dataOperatorLog")
|
||||
public class StubDataOperatorLog implements DataOperatorLog {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger("eip3.datalog");
|
||||
|
||||
@Override
|
||||
public DataLogItem insertData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("insert {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataLogItem updateData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("update {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataLogItem deleteData(GeneralPOJO po, String dataLogItemId, String mainDataLogItemId) {
|
||||
LOG.debug("delete {} id={}", po.get_TableName(), po.get_ID());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.dataDic.bean.GeneralPOJO;
|
||||
import com.dsasp.server.common.file.service.FileService;
|
||||
|
||||
/**
|
||||
* WS1 桩:附件服务。PoC 选定功能不含附件操作,全部 no-op;
|
||||
* 接口签名原样保留,P2 阶段以 EIP3 真实现替换。
|
||||
*/
|
||||
@Service("fileService")
|
||||
public class StubFileService implements FileService {
|
||||
|
||||
@Override
|
||||
public String save(String tempFile, String fileName, int size, String tableName, String businessKey, Properties ctx) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDoc(String relativePath, String fileName, int size, String tableName, String businessKey, Properties ctx) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDocFile(String relativePath, String fileName, boolean isZip) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> fileIds, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String fileId, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAttatchmentByBusinessKey(String businessKey, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAttatchmentByBusinessKey(List<String> businessKeys, String userId) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearDeletedDocument() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearDumpFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GeneralPOJO> getDoc(List<String> businessKeys) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPicPath(String tablename, String businesskey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveDecoderBase64File(String base64Code, String userId, String tableName, Properties ctx) throws Exception {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.eip4.platform.auth.stub;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dsasp.server.common.log.bean.SysLogItem;
|
||||
import com.dsasp.server.common.log.service.SystemLogManager;
|
||||
|
||||
/**
|
||||
* WS1 桩:系统日志。原版写库(操作日志审计),PoC 阶段降级为 slf4j 输出。
|
||||
*/
|
||||
@Service("systemLogManager")
|
||||
public class StubSystemLogManager implements SystemLogManager {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger("eip3.syslog");
|
||||
|
||||
@Override
|
||||
public void log(LogType logType, String logContent) {
|
||||
LOG.info("[{}] {}", logType, logContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByType(String type) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(List<SysLogItem> items) {
|
||||
if (items != null) {
|
||||
items.forEach(i -> LOG.info("[batch] {}", i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByLoginTime(List<String> userIds, DateTime[] loginTimes) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user