ResourceController.java
880 Bytes
package com.bsth.controller;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.bsth.entity.sys.Resource;
import com.bsth.service.ResourceService;
@RestController
@RequestMapping("resource")
public class ResourceController extends BaseController<Resource, Integer>{
@Autowired
ResourceService resourceService;
@RequestMapping(value = "/batch", method = RequestMethod.POST)
public Map<String, Object> save(@RequestParam String array){
return resourceService.saveList(JSON.parseArray(array, Resource.class));
}
}