簡體   English   中英

如何在Spring中排除模式?

[英]How to exclude a pattern in Spring?

我注釋了一個類,如下所示(它將用於WebSocket)

"@ServerEndpoint("/myEndPoint")" 

當我啟動我的Web應用程序時,我收到如下消息:

03/13/2015 10:37:33.953 [qtp1157136713-20 - ] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Mapping [/myEndPoint] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@10dc828b] and 1 interceptor

因此,無論何時我發送websocket請求,Spring都會截獲它。 如何將Spring配置為不攔截以“ myEndPoint”開頭的任何URL?

嘗試這個:

@ServerEndpoint(value = "/myEndPoint", configurator = SpringConfigurator.class)

另請參閱鏈接: http : //spring.io/blog/2013/05/23/spring-framework-4-0-m1-websocket-support

使用sprint-security.xml,我可以排除URL

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM