Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. @RequestMapping(value="/getMenuTreeByUser")
  2. @ResponseBody
  3. public List<Object> getMenuTreeByUser(@RequestParam Map<String, Object> param) {
  4. LoginUser user = SessionUtil.getLoginUser();
  5. param.put("LANGUAGE", user.getLocalLanguage());
  6. param.put("LOGIN_ID", user.getUserId());
  7. param.put("CPNY_ID", user.getCpnyId());
  8.  
  9. return menuService.getMenuTreeByUser(param);
  10. }
  11.  
  12. @Override
  13. public List<Object> getMenuTreeByUser(Map<String, Object> param) {
  14. List<Object> menuTree = new ArrayList<>();
  15. Map<Object, Object> menuMap = new LinkedHashMap<>();
  16. List<Object> menuList = menuDao.getMenuListByUser(param);
  17.  
  18. for (Object item : menuList) {
  19. Map<String, Object> menu = (Map<String, Object>) item;
  20. int read = ((BigDecimal) menu.get("F_READ")).intValue();
  21. int depth = ((BigDecimal) menu.get("DEPTH")).intValue();
  22. int parentMenuNo = ((BigDecimal) menu.get("PARENT_MENU_NO")).intValue();
  23. int menuNo = ((BigDecimal) menu.get("MENU_NO")).intValue();
  24.  
  25. menuMap.put(menuNo, menu);
  26. if (read == 0) {
  27. continue;
  28. } else if (depth == 0) {
  29. menuTree.add(menu);
  30. } else {
  31. Map<String, Object> parentMenu = (Map<String, Object>) menuMap.get(parentMenuNo);
  32. if (parentMenu == null) {
  33. continue;
  34. }
  35. if (!parentMenu.containsKey("ITEMS")) {
  36. parentMenu.put("ITEMS", new ArrayList<Objects>());
  37. }
  38. List<Object> items = (List<Object>) parentMenu.get("ITEMS");
  39. items.add(menu);
  40. }
  41. }
  42. return menuTree;
  43. }
  44.  
  45. 08:50:38.464 [http-bio-8080-exec-7] DEBUG o.s.s.w.u.m.AntPathRequestMatcher - Checking match of request : '/service/login'; against '/resources/**'
  46. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.security.web.FilterChainProxy - /service/login at position 1 of 10 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
  47. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
  48. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@13b4a920. A new one will be created.
  49. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.security.web.FilterChainProxy - /service/login at position 2 of 10 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
  50. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.security.web.FilterChainProxy - /service/login at position 3 of 10 in additional filter chain; firing Filter: 'LogoutFilter'
  51. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.security.web.FilterChainProxy - /service/login at position 4 of 10 in additional filter chain; firing Filter: 'CustomAuthenticationProcessingFilter'
  52. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.w.u.m.AntPathRequestMatcher - Checking match of request : '/service/login'; against '/service/login'
  53. 08:50:38.465 [http-bio-8080-exec-7] DEBUG c.m.s.s.CustomAuthenticationProcessingFilter - Request is to process authentication
  54. 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using com.mandiri.spring.security.CustomAuthenticationProvider
  55. 08:50:38.466 [http-bio-8080-exec-7] INFO o.s.s.a.AuthenticationProvider - Welcome authenticate! admin@JJ
  56. 08:50:38.480 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Creating new transaction with name [com.mandiri.hr.sys.service.impl.LoginServiceImpl.login]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
  57. 08:50:38.480 [http-bio-8080-exec-7] DEBUG o.s.j.d.DriverManagerDataSource - Creating new JDBC DriverManager Connection to [jdbc:mysql://localhost:3306/hubic]
  58. 08:50:38.502 [http-bio-8080-exec-5] DEBUG o.s.s.w.u.m.AntPathRequestMatcher - Checking match of request : '/resources/styles/kendoui/silver/loading-image.gif'; against '/resources/**'
  59. 08:50:38.502 [http-bio-8080-exec-5] DEBUG o.s.security.web.FilterChainProxy - /resources/styles/kendoui/Silver/loading-image.gif has an empty filter list
  60. 08:50:39.020 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Acquired Connection [com.mysql.jdbc.JDBC4Connection@5e49e669] for JDBC transaction
  61. 08:50:39.026 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Switching JDBC Connection [com.mysql.jdbc.JDBC4Connection@5e49e669] to manual commit
  62. 08:50:39.030 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
  63. 08:50:39.062 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
  64. 08:50:39.070 [http-bio-8080-exec-7] DEBUG o.m.s.t.SpringManagedTransaction - JDBC Connection [com.mysql.jdbc.JDBC4Connection@5e49e669] will be managed by Spring
  65. 08:50:39.074 [http-bio-8080-exec-7] DEBUG com.mandiri.hr.sys.dao.UserDao.login - ==> Preparing: SELECT U.PERSON_ID, U.CPNY_ID, U.USER_ID, U.PW, U.SPECIAL_PARAM, U.SPECIAL_VALUE, U.USER_TP, U.PW_HIST_1, U.PW_HIST_2, U.PW_HIST_3, U.DFLT_PW, U.PW_LAST_CHNG_DT, E.EMP_NO, E.ENG_NM, E.LOCAL_NM, E.NICKNAME, E.JOB_TITLE, E.DEPT_NO, NULL DEPT_NM FROM SYS_USER U LEFT JOIN HRM_EMP E ON E.PERSON_ID = U.PERSON_ID WHERE U.VALIDITY = 1 AND U.USER_ID = 'admin' AND U.CPNY_ID = 'JJ'
  66. 08:50:39.091 [http-bio-8080-exec-7] DEBUG com.mandiri.hr.sys.dao.UserDao.login - ==> Parameters:
  67. 08:50:39.113 [http-bio-8080-exec-7] DEBUG com.mandiri.hr.sys.dao.UserDao.login - <== Total: 1
  68. 08:50:39.114 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
  69. 08:50:39.115 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization committing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
  70. 08:50:39.115 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
  71. 08:50:39.115 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
  72. 08:50:39.115 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Initiating transaction commit
  73. 08:50:39.115 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Committing JDBC transaction on Connection [com.mysql.jdbc.JDBC4Connection@5e49e669]
  74. 08:50:39.116 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Releasing JDBC Connection [com.mysql.jdbc.JDBC4Connection@5e49e669] after transaction
  75. 08:50:39.116 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
  76. 08:50:39.118 [http-bio-8080-exec-7] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
  77. 08:50:39.118 [http-bio-8080-exec-7] DEBUG c.m.s.s.CustomAuthenticationProcessingFilter - Authentication success. Updating SecurityContextHolder to contain: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@ca30650a: Principal: admin@JJ; Credentials: [PROTECTED]; Authenticated: true; Details: LoginUser [userId=admin, cpnyId=JJ, authorities=[ROLE_USER], empNo=null, engNm=null, localNm=null, nickname=null]; Granted Authorities: ROLE_USER
  78. 08:50:39.118 [http-bio-8080-exec-7] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
  79. 08:50:39.121 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
  80. 08:50:39.121 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@15ae90f6]
  81. 08:50:39.121 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
  82. 08:50:39.121 [http-bio-8080-exec-7] DEBUG o.s.j.d.DriverManagerDataSource - Creating new JDBC DriverManager Connection to [jdbc:mysql://localhost:3306/hubic]
  83. 08:50:39.139 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Registering transaction synchronization for JDBC Connection
  84. 08:50:39.140 [http-bio-8080-exec-7] DEBUG o.m.s.t.SpringManagedTransaction - JDBC Connection [com.mysql.jdbc.JDBC4Connection@10427bdd] will be managed by Spring
  85. 08:50:39.140 [http-bio-8080-exec-7] DEBUG c.m.h.s.d.MenuDao.getMenuListByUser - ==> Preparing: SELECT A.*, B.P_SEL F_READ, B.P_UDT F_WRITE FROM (SELECT M.MENU_NO, M.PARENT_MENU_NO, M.DEPTH, M.MENU_URL, L.CD_NM MSG_ID, M.ORDR_NO, M.HQ FROM SYS_MENU M, SYS_CODE_INTL L WHERE M.MENU_NO = L.CD_NO AND M.VALIDITY = 1 AND L.LOCALE = 'en' ORDER BY M.DEPTH, M.ORDR_NO) A, (SELECT MENU_NO, 1 P_SEL, 1 P_UDT FROM SYS_MENU WHERE VALIDITY = 1) B WHERE A.MENU_NO = B.MENU_NO ORDER BY 3, 6
  86. 08:50:39.140 [http-bio-8080-exec-7] DEBUG c.m.h.s.d.MenuDao.getMenuListByUser - ==> Parameters:
  87. 08:50:39.143 [http-bio-8080-exec-7] DEBUG c.m.h.s.d.MenuDao.getMenuListByUser - <== Total: 171
  88. 08:50:39.143 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@15ae90f6]
  89. 08:50:39.143 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@15ae90f6]
  90. 08:50:39.143 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@15ae90f6]
  91. 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
  92. 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Should roll back transaction but cannot - no transaction available
  93. 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - SecurityContext stored to HttpSession: 'org.springframework.security.core.context.SecurityContextImpl@ca30650a: Authentication: org.springframework.security.authentication.UsernamePasswordAuthenticationToken@ca30650a: Principal: admin@JJ; Credentials: [PROTECTED]; Authenticated: true; Details: LoginUser [userId=admin, cpnyId=JJ, authorities=[ROLE_USER], empNo=null, engNm=null, localNm=null, nickname=null]; Granted Authorities: ROLE_USER'
  94. 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
  95. 08:50:39.413 [http-bio-8080-exec-5] DEBUG o.s.s.w.u.m.AntPathRequestMatcher - Checking match of request : '/resources/styles/kendoui/silver/sprite.png'; against '/resources/**'
  96. 08:50:39.413 [http-bio-8080-exec-5] DEBUG o.s.security.web.FilterChainProxy - /resources/styles/kendoui/Silver/sprite.png has an empty filter list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement