开发者

How to create a custom Spring LoginMessageInterceptor?

开发者 https://www.devze.com 2023-01-06 06:33 出处:网络
How can I create and register my ow开发者_如何学Cn LoginMessageInterceptor in Spring?Not sure have you solved this. My example is based on Spring-Flex. From Spring-Flex reference and Spring Flex Javad

How can I create and register my ow开发者_如何学Cn LoginMessageInterceptor in Spring?


Not sure have you solved this. My example is based on Spring-Flex. From Spring-Flex reference and Spring Flex Javadoc, have your class implements MessageInterceptor or override the default class provided by Spring, register it with desired position attribute of the message-interceptor configuration tag. Example for my case:

<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>

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消