the code as below:
@Controller
public class MapEventHandler implements EventHandler{
@Resource
VisitorMacService visitorMacService;
@RequestMapping("/maptest")
@ResponseBody
public String maptest(){
return "maptest";
}
@Override
public void onEvent(MapEvent event, long sequence, boolean endOfBatch) throws Exception {
// TODO Auto-generated method stub
visitorMacList = visitorMacService.getAllMacList();
}
} when visited the url "localhost:8080/maptest", the bean "visitorMacService" can be generated automatically. But when data is putted in the ringBuffer, executing the method of "onEvent()" automatically, the bean "visitorMacService" is null. why? Can someone help?
Spring version: 4.0.2 lmax disruptor version: 3.2.1