我的流程中定义了以下组件:
<component doc:name="GraduationService">
<method-entry-point-resolver>
<include-entry-point method="getGraduationDatesWithPidmOrStudentId"/>
</method-entry-point-resolver>
<spring-object bean="graduationService" />
</component>
我正在尝试调用“graduationService”bean 中定义的“getGraduationDatesWithPidmOrStudentId”方法。这是方法签名的样子:
public Object getGraduationDatesWithPidmOrStudentId(@Payload Payload payload,
@InboundHeaders("studentId") String studentId,
@InboundHeaders("pidm") String pidm ) { ....... }
我收到以下错误:
Message : Failed to find entry point for component, the following resolvers tried but failed: [
ExplicitMethodEntryPointResolver: Could not find entry point on: "edu.ucdavis.iet.apis.students.graduation.service.GraduationService" with arguments: "{class java.lang.String}"
]
Code : MULE_ERROR-321
--------------------------------------------------------------------------------
Exception stack is:
1. Failed to find entry point for component, the following resolvers tried but failed: [
ExplicitMethodEntryPointResolver: Could not find entry point on: "edu.ucdavis.iet.apis.students.graduation.service.GraduationService" with arguments: "{class java.lang.String}"
] (org.mule.model.resolvers.EntryPointNotFoundException)
org.mule.model.resolvers.DefaultEntryPointResolverSet:49 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/model/resolvers/EntryPointNotFoundException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.model.resolvers.EntryPointNotFoundException: Failed to find entry point for component, the following resolvers tried but failed: [
ExplicitMethodEntryPointResolver: Could not find entry point on: "edu.ucdavis.iet.apis.students.graduation.service.GraduationService" with arguments: "{class java.lang.String}"
]
at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:49)
at org.mule.component.DefaultComponentLifecycleAdapter.invoke(DefaultComponentLifecycleAdapter.java:339)
at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:82)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
如果我删除 InboundHeaders 的注释并将“@Payload Payload 有效负载”更改为“@Payload String 有效负载”,我至少无法解决该方法。那么,我似乎不明白 @InboundHeader 注释应该如何工作。