Index: core-module/src/main/java/egovframework/com/ext/jstree/support/mvc/GenericAbstractController.java =================================================================== diff -u -r3378aeef18251570015a9efbed6402f39cffd95d -r2c429d2bdf95c8f63d0d7b4db10ccfe6b3342a9b --- core-module/src/main/java/egovframework/com/ext/jstree/support/mvc/GenericAbstractController.java (.../GenericAbstractController.java) (revision 3378aeef18251570015a9efbed6402f39cffd95d) +++ core-module/src/main/java/egovframework/com/ext/jstree/support/mvc/GenericAbstractController.java (.../GenericAbstractController.java) (revision 2c429d2bdf95c8f63d0d7b4db10ccfe6b3342a9b) @@ -55,7 +55,7 @@ response.setContentType("application/json; charset=UTF-8"); PrintWriter out = response.getWriter(); Map map = new HashMap(); - map.put("status", 0); + map.put("status", "Exception Catch"); Gson gson = new GsonBuilder().serializeNulls().create(); out.println(gson.toJson(map)); out.flush(); Index: core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java =================================================================== diff -u -reb34881aeb547715d0a9a65ebb7c22595ddccdcd -r2c429d2bdf95c8f63d0d7b4db10ccfe6b3342a9b --- core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java (.../SecurityController.java) (revision eb34881aeb547715d0a9a65ebb7c22595ddccdcd) +++ core-module/src/main/java/egovframework/com/ext/jstree/support/security/controller/SecurityController.java (.../SecurityController.java) (revision 2c429d2bdf95c8f63d0d7b4db10ccfe6b3342a9b) @@ -2,6 +2,7 @@ import egovframework.com.ext.jstree.support.mvc.GenericAbstractController; import org.springframework.security.web.csrf.CsrfToken; +import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; @@ -10,16 +11,15 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; @Controller @RequestMapping(value = {"/api/jsTreeServiceFramework/security"}) public class SecurityController extends GenericAbstractController { @ResponseBody @RequestMapping(value = {"/csrf.do"}, method = { RequestMethod.GET, RequestMethod.POST }) - public ModelAndView jsTreeCSRFtoJson(HttpSession session, ModelMap model, HttpServletRequest request) throws Exception { - CsrfToken token = (CsrfToken) session.getAttribute("HttpSessionCsrfTokenRepository.CSRF_TOKEN"); + public ModelAndView jsTreeCSRFtoJson(ModelMap model, HttpServletRequest request) throws Exception { + CsrfToken token = new HttpSessionCsrfTokenRepository().loadToken(request); ModelAndView modelAndView = new ModelAndView("jsonView"); modelAndView.addObject("result", token.getToken()); return modelAndView;