While passing an enum in a REST controller, I'm getting java.lang.IllegalArgumentException whereas I'm using enum as string (stackoverflow.com)stack
13 points by Ravi Singh Shekhawat in stackoverflow.com · 7y ago · stack
Controller:- @RequestMapping(value="/CreateMovie", method= RequestMethod.POST) public HttpStatus createMovie(@RequestBody JSONObject object) { Movie movie =new Movie(object.optString("name"), MovieType.valueOf(object.optString("type")), new Date(object.optString("releasedate")),…