import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.databind.ObjectMapper;
@Autowired
private LoginStrategy loginStrategy;
- @RequestMapping(value = { "/profile_search" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/profile_search" })
public ModelAndView profileSearch(HttpServletRequest request) {
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
}
- @RequestMapping(value = { "/get_user_pagination" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/get_user_pagination" })
public void getUserPagination(HttpServletRequest request, HttpServletResponse response) {
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
return model;
}
- @RequestMapping(value = { "/profile/toggleProfileActive" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/profile/toggleProfileActive" })
public void toggleProfileActive(HttpServletRequest request, HttpServletResponse response) throws IOException {
try {
logger.info(EELFLoggerDelegate.applicationLogger,
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.databind.DeserializationFeature;
@Autowired
private RoleService roleService;
- @RequestMapping(value = { "/role" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/role" })
public ModelAndView role(HttpServletRequest request) throws IOException {
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
return new ModelAndView(getViewName(), model);
}
- @RequestMapping(value = { "/get_role" }, method = RequestMethod.GET)
+ @GetMapping(value = { "/get_role" })
public void getRole(HttpServletRequest request, HttpServletResponse response) throws IOException {
Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
* @throws IOException
* If the write to the result project fails
*/
- @RequestMapping(value = { "/role/saveRole" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/role/saveRole" })
public ModelAndView saveRole(HttpServletRequest request, HttpServletResponse response) throws IOException {
JSONObject j = null;
User user = UserUtils.getUserSession(request);
return null;
}
- @RequestMapping(value = { "/role/removeRoleFunction" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/role/removeRoleFunction" })
public ModelAndView removeRoleFunction(HttpServletRequest request, HttpServletResponse response) throws IOException {
User user = UserUtils.getUserSession(request);
logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction");
}
- @RequestMapping(value = { "/role/addRoleFunction" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/role/addRoleFunction" })
public ModelAndView addRoleFunction(HttpServletRequest request, HttpServletResponse response) throws IOException {
User user = UserUtils.getUserSession(request);
logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction");
}
- @RequestMapping(value = { "/role/removeChildRole" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/role/removeChildRole" })
public ModelAndView removeChildRole(HttpServletRequest request, HttpServletResponse response) throws IOException {
User user = UserUtils.getUserSession(request);
logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeChileRole");
}
- @RequestMapping(value = { "/role/addChildRole" }, method = RequestMethod.POST)
+ @PostMapping(value = { "/role/addChildRole" })
public ModelAndView addChildRole(HttpServletRequest request, HttpServletResponse response) throws IOException {
User user = UserUtils.getUserSession(request);
logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.addChileRole");