Let's perform user CRUD operations. As we have discussed CRUD concepts before, here we will only discuss User management on Spring 5 (without Reactive support). Let's fill in all dummy methods for CRUD endpoints. In here, we can create UserContoller
and fill in all methods for CRUD user operations:
package com.packtpub.restapp; import java.util.LinkedHashMap; import java.util.Map; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/user") public class UserController { @ResponseBody @RequestMapping("") public Map<String, Object> getAllUsers(){ Map<String, Object> map = new LinkedHashMap<>(); map.put("result", "Get All Users...