0
在我的spring 3控制器中執行以下方法期間,出現錯誤(AtmosphereResource類型不是通用的;它不能用參數進行參數化)。Spring 3 +大氣 - 類型AtmosphereResource不是通用的
@RequestMapping(value="/websockets", method=RequestMethod.GET)
@ResponseBody
public void websockets(final AtmosphereResource<HttpServletRequest,HttpServletResponse> event) {
final HttpServletRequest req = event.getRequest();
final HttpServletResponse res = event.getResponse();
event.suspend();
final Broadcaster bc = event.getBroadcaster();
bc.scheduleFixedBroadcast(new Callable<String>() {
public String call() throws Exception {
return (new Date()).toString();
}
}, 11, TimeUnit.SECONDS);
}
BeanInstantiationException爲AtmosphereResource。請幫忙! – masT 2013-12-17 06:21:19
跳轉到大氣郵件列表...或嘗試2.1.0-RC1並閱讀https://github.com/Atmosphere/atmosphere/wiki/Configuring-Atmosphere's-Classes-Creation-and-Injection – jfarcand 2013-12-17 21:45:33