在spring3.0以上直接在contraller层加上 @CrossOrigin
例子:
@ResponseBody
@RequestMapping("/list2/{pageNum}/{pageSize}")
public PageInfo<FyCustomerAndIntentionaddr> getAllFyCustomer(@PathVariable Integer pageNum,@PathVariable Integer pageSize) throws Exception{
return fyCustomerService.getAllFyCustomerAndIntentionaddr(pageNum, pageSize);
}