@RequestMapping(value = "/api/scripts", method = RequestMethod.POST)
    public
    @ResponseBody
    Script addScript(Model model,
                     @RequestParam(required = true) String name,
                     @RequestParam(required = true) String script) throws Exception {

        return ScriptService.getInstance().addScript(name, script);
    }
@ RequestMapping ( value = "/api/scripts" , method = RequestMethod . POST ) public @ ResponseBody Script addScript ( Model model , @ RequestParam ( required = true ) String name , @ RequestParam ( required = true ) String script ) throws Exception { return ScriptService . getInstance ( ) . addScript ( name , script ) ; }
Add a new script

@param model
@param name
@param script
@return
@throws Exception