【发布时间】:2015-09-09 20:07:48
【问题描述】:
我正在创建一个自定义 SpringXD 处理器。我正在尝试从 SpringXD 流定义中读取一些属性,其中一些从属性文件中读取。我的模块的 XML 中有以下内容:
<context:property-placeholder location="classpath:config/myModule.properties" ignore-resource-not-found="true" system-properties-mode="OVERRIDE" />
<int:channel id="input"/>
<bean id="sessionProperties" class="com.mycompany.namespace.SomeConfigClassName">
<property name="hostNames" value="${hostNames}"/>
<property name="port" value="${port}"/>
</bean>
<int:transformer input-channel="input" output-channel="output">
<bean id="jmsTemplate" class="com.mycompany.namespace.ModuleClassName">
<property name="sessionProperties" ref="sessionProperties"/>
</bean>
</int:transformer>
<int:channel id="output"/>
我正在定义我的流,如下所示:
stream create --name my-stream --definition "time | my-custom-module --port=1440 | log" --deploy
我不断收到以下错误:
Command failed org.springframework.xd.rest.client.impl.SpringXDException: Error with option(s) for module my-custom-module of type processor:
port: option named 'port' is not supported
这是我的属性文件的内容:
hostNames=foo.mycompany.com
有什么想法吗?
【问题讨论】:
标签: spring spring-integration spring-xd