Announcement Announcement Module
Collapse
No announcement yet.
Iterable object as parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Iterable object as parameter

    Hi I need to pass a json object in POST request of the SPRING DATA REST. Is it possible to pass directly and make it process with save(iterable) with any Jackson script or we have to use a Controller with @RequestBody and process the Iterable and save it using repository function??

    Now I am doing,

    @RequestMapping(value = "batchInsert", method = RequestMethod.POST)
    @ResponseBody
    public String batchInsert(@RequestBody List<Test> test){
    testRepo.save(test);
    return "loaded";
    }

    and implements Serilizable in DAO object and my doubt whether there is any default format to pass whole json without using any controller as CRUD operates normally. Please help me find solution. Am new to springs. Thanks in advance.
Working...
X