ajax实现跨域请求

在spring3.0以上直接在contraller层加上      @CrossOrigin

例子:

    @CrossOrigin
    @ResponseBody
    @RequestMapping("/list2/{pageNum}/{pageSize}")
    public PageInfo<FyCustomerAndIntentionaddr> getAllFyCustomer(@PathVariable Integer pageNum,@PathVariable Integer pageSize) throws Exception{
   
        return fyCustomerService.getAllFyCustomerAndIntentionaddr(pageNum, pageSize);
    }
   

猜你喜欢

转载自blog.csdn.net/fjcsdn/article/details/77520938