Spring 4 websocket + Tomcat 7.54 async-supported not working

后端 未结 6 647
名媛妹妹
名媛妹妹 2020-12-19 13:04

I am creating a sample chat application using the Spring websockets and stomp.js , I am using the tomcat 7.54 but while runing the application I am gettting a async-support

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 13:57

    I was having the same issue with SpringBoot app and for me, it started working

    1) after adding asyncSupported to the filter like @WebFilter(urlPatterns="/api-acess/*",asyncSupported = true )

    2) added sameOrigin() support to WebSecurityConfigurerAdapter extended class like http.headers().frameOptions().sameOrigin();

    I hope it will help someone else.

提交回复
热议问题