求助:Spring Integration File Splitter未在Integration Graph中显示
解决Spring Integration Graph中int-file:splitter元素缺失的问题
我之前也碰到过类似的Spring Integration Graph元素不显示的情况,结合你使用的STS 3.9.4(基于Eclipse Oxygen.1a)和Spring Integration 4.3.15环境,给你几个实用的排查和解决方向:
1. 检查版本兼容性匹配
STS的Spring Integration Graph视图插件对不同版本的Spring Integration框架有一定的支持范围。STS 3.9.4发布于2018年,而Spring Integration 4.3.15也是同期版本,但有可能插件对int-file:splitter的图形渲染存在小范围的遗漏。你可以尝试:
- 升级STS到同系列的较新版本(比如3.9.10,依然基于Eclipse Oxygen),该版本可能修复了部分图形解析的bug
- 确认Spring Integration 4.3.15是否在STS 3.9.4的官方支持列表中
2. 调整配置中的ID格式
你的splitter配置里的ID是15bfileSplitter,虽然XML规范允许数字开头的ID,但STS的图形解析器对这类ID可能存在解析异常。建议你把ID修改为字母开头的格式,比如fileSplitter15b,然后:
- 保存配置文件
- 关闭并重新打开Integration Graph视图
- 或者重启STS后再查看
3. 清理STS缓存并刷新视图
有时候STS的视图缓存会导致元素无法正常加载,你可以按以下步骤操作:
- 关闭当前的Integration Graph视图
- 执行
Project -> Clean...,选择你的项目进行清理 - 重启STS,重新打开Integration Graph视图查看
附上你的配置代码(已格式化):
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:int="http://www.springframework.org/schema/integration" xmlns:context="http://www.springframework.org/schema/context" xmlns:int-file="http://www.springframework.org/schema/integration/file" xmlns:int-mail="http://www.springframework.org/schema/integration/mail" xmlns:int-xml="http://www.springframework.org/schema/integration/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int-stream="http://www.springframework.org/schema/integration/stream" xsi:schemaLocation=" http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-4.3.xsd http://www.springframework.org/schema/tool classpath:org.springframework/beans/factory/xml/spring-tool-4.3.xsd http://www.springframework.org/schema/context classpath:org.springframework/context/config/spring-context-4.3.xsd http://www.springframework.org/schema/integration classpath:org.springframework/integration/config/spring-integration-4.3.xsd http://www.springframework.org/schema/integration/stream classpath:org.springframework/integration/stream/config/spring-integration-stream-4.3.xsd http://www.springframework.org/schema/integration/file classpath:org.springframework/integration/file/config/spring-integration-file-4.3.xsd http://www.springframework.org/schema/integration/xml classpath:org.springframework/integration/xml/config/spring-integration-xml-4.3.xsd http://www.springframework.org/schema/integration/mail classpath:org.springframework/integration/mail/config/spring-integration-mail-4.3.xsd"> <int-file:splitter id="15bfileSplitter" input-channel="PVDR15bChannel" output-channel="PVDR15bLineChannel" /> </beans>
内容的提问来源于stack exchange,提问作者jlindahl
相关产品推荐
相关产品推荐

