0

Spring-Integration 3.0 と Spring-Integration Gemfire サポートを使用しています。inbound-channel-adapter が SpEL 式に基づいてキャッシュ内のオブジェクトをペイロードとして取得するようにしたかったのです。入力アダプターによって選択されるペイロードのプロパティをチェックするカスタム式エバリュエーター クラスを作成しました。クラスコードは以下の通りです。

@Component
public class GraphMatchingUtil {

public static boolean evaluate(NodeGraph nodeGraph){
    if(nodeGraph.getLastProcessedTS()!=null){

        if(nodeGraph.getLastProcessedTS().getTime() -  DateTimeUtil.createTimestamp().getTime() > 100000){
            return true;
        }
    }
    else{
        if(nodeGraph.getCreateTS().getTime() -  DateTimeUtil.createTimestamp().getTime() > 100000){
            return true;
        }
    }
    return false;
}

}

そして、構成コードは次のとおりです

<int:spel-function id="match" class="com.equ.util.GraphMatchingUtil" method="evaluate(com.equ.bo.NodeGraph)"/>
<int-gfe:inbound-channel-adapter id="graphadapter" channel="reconchannel" region="cacheRegion" cache-events="CREATED, UPDATED" expression="@match(payload)==true"/>

ただし、このコードを実行した後、次のエラーが発生します。

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphadapter': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'payloadExpression' threw exception; nested exception is org.springframework.expression.spel.SpelParseException: EL1041E:(pos 6): After parsing a valid expression, there is still more data in the expression: 'lparen(()'
     Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
     PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'payloadExpression' threw exception; nested exception is org.springframework.expression.spel.SpelParseException: EL1041E:(pos 6): After parsing a valid expression, there is still more data in the expression: 'lparen(()'

何が問題なのかを理解するのを手伝ってくれる人はいますか?

@ を # に置き換えた後、次のエラーが発生しました。

   org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'payload' cannot be found on object of type 'com.gemstone.gemfire.internal.cache.EntryEventImpl'
4

2 に答える 2