Skip to content

Commit cab7b53

Browse files
committed
feat: update code
1 parent 222c572 commit cab7b53

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

app/src/main/java/com/tinyengine/it/TinyEngineApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
@SpringBootApplication
2626
@EnableAspectJAutoProxy
27-
@MapperScan({"com.tinyengine.it.mapper","com.tinyengine.it.dynamic.dao","com.tinyengine.it.mcp.tools"})
27+
@MapperScan({"com.tinyengine.it.mapper","com.tinyengine.it.dynamic.dao","com.tinyengine.it.mcp"})
2828
public class TinyEngineApplication {
2929
/**
3030
* The entry point of application.

base/src/main/java/com/tinyengine/it/mcp/tools/GitFileReaderService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ public String readFileFromRepo(String url) {
105105
throw new Exception("bundle.json 解析失败,缺少 materials 字段");
106106
}
107107
Result<BundleResultDto> bundleResultDtoResult = parseBundle(bundleDto);
108+
if(!bundleResultDtoResult.isSuccess()) {
109+
throw new Exception("bundle.json 解析失败: " + bundleResultDtoResult.getMessage());
110+
}
111+
if(bundleResultDtoResult.getData() == null || bundleResultDtoResult.getData().getComponentList() == null) {
112+
throw new Exception("bundle.json 解析失败,组件列表为空");
113+
}
108114
log.info("从 URL {} 中读取文件 '{}' 的内容并解析完成", url, path);
109115
log.info("组件列表: {}", bundleResultDtoResult.getData().getComponentList());
110116

0 commit comments

Comments
 (0)