AtmosphereResource即将为空。

时间:2018-02-28 13:00:43

标签: javascript java spring spring-boot atmosphere

您好我关注了链接:How to design push notifications using Atmosphere

设计推送通知,但是在行之后得到一个空的AtmosphereResource:AtmosphereResource resource = (AtmosphereResource)request.getAttribute(ApplicationConfig.ATMOSPHERE_RESOURCE);

我使用过代码:  AtmosphereFramework f = new AtmosphereFramework(); f.init(); 在我的主要功能是春季启动应用程序。

使用wiki安装Atmosphere:https://github.com/Atmosphere/atmosphere/wiki/Installing-Atmosphere

客户端代码与答案指定相同

有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

发现了错误.. 必须添加代码:f.doCometSupport(AtmosphereRequest, AtmosphereResponse); 当我的请求进来时。

相关问题