我在做spring mvc+websocket时遇到session为null的问题。
我在登录的controller里记录了session
我查到网上有一个解释是httpsession创建早于websocket,
具体的链接是http://stackoverflow.com/questions/20240591/websocket-httpsession-returns-null。
我不知道如何保证ServletRequestListener早于WebSocket?或者利用其它方式可以解决?
我的一些配置如下:
WebsocketEndPoint
spring.xml
jsp
你有没有登录呢?要登陆了才能取到