0

如何LoginMessageInterceptor在 Spring 中创建和注册自己的?

4

1 回答 1

0

不确定你是否解决了这个问题。我的示例基于 Spring-Flex。从Spring-Flex 参考Spring Flex Javadoc中,让您的类实现 MessageInterceptor 或覆盖 Spring 提供的默认类,将其注册到message-interceptor配置标记的所需位置属性。我的案例示例:

<bean id="myMessageInterceptor" class="my.mimos.kec.ooes.security.LoginMessageInterceptor"/>
<flex:message-broker mapping-order="1">
    <flex:message-interceptor position="LOGIN_MESSAGE_INTERCEPTOR" ref="myMessageInterceptor"/>
    <flex:mapping pattern="/messagebroker/*"/>
    <flex:message-service
        default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
    <flex:secured />
</flex:message-broker>

谢谢。

于 2011-06-15T03:46:48.400 回答