我正在尝试为 Spring 云流创建 Spring Cloud 合同。我有源、处理器和接收器。源使用 SourcePollingChannelAdapte。合同 groovy 文件如下所示:
package contracts.messaging
import org.springframework.cloud.contract.spec.Contract
Contract.make {
description("""
Sends a non XhubJobState in Message
""")
// Label by means of which the output message can be triggered
label 'accpetable_message'
// input to the contract
input {
// the contract will be triggered by a method
triggeredBy('verifyValidXhubJobState()')
}
// output message of the contract
outputMessage {
// destination to which the output message will be sent
sentTo 'verifications'
// the body of the output message
body([
jobName:"Invalid_Destinations"
])
}
}
当尝试进行 Maven 安装时,我得到了异常:
"Exception took place while trying to resolve the destination. Will assume the name [verifications]
java.lang.NullPointerException: null
at org.springframework.cloud.contract.verifier.messaging.stream.StreamStubMessages.resolvedDestination(StreamStubMessages.java:89)......."
我在 application.properties 文件中定义了以下属性集
"spring.cloud.stream.bindings.output.destination= verifications"
我在配置中遗漏了什么吗?