RequestMapping: annotation used to handle requested URL mapping, which can be used on a class or method. For a class, that means that all methods in the class that respond to requests have that address as the parent path. @RequestBody: Annotation implementation receives JSON data from HTTP requests and converts json to Java objects. ResponseBody: The annotation implementation converts the object returned by the Conreoller method into a JSON object response to the client.
Spring MVC exception handling: You can throw exceptions to the Spring framework, which handles them; We just need to configure a simple exception handler and add a view page to the exception handler.