Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping(value="/getMenuTreeByUser")
- @ResponseBody
- public List<Object> getMenuTreeByUser(@RequestParam Map<String, Object> param) {
- LoginUser user = SessionUtil.getLoginUser();
- param.put("LANGUAGE", user.getLocalLanguage());
- param.put("LOGIN_ID", user.getUserId());
- param.put("CPNY_ID", user.getCpnyId());
- return menuService.getMenuTreeByUser(param);
- }
- @Override
- public List<Object> getMenuTreeByUser(Map<String, Object> param) {
- List<Object> menuTree = new ArrayList<>();
- Map<Object, Object> menuMap = new LinkedHashMap<>();
- List<Object> menuList = menuDao.getMenuListByUser(param);
- for (Object item : menuList) {
- Map<String, Object> menu = (Map<String, Object>) item;
- int read = ((BigDecimal) menu.get("F_READ")).intValue();
- int depth = ((BigDecimal) menu.get("DEPTH")).intValue();
- int parentMenuNo = ((BigDecimal) menu.get("PARENT_MENU_NO")).intValue();
- int menuNo = ((BigDecimal) menu.get("MENU_NO")).intValue();
- menuMap.put(menuNo, menu);
- if (read == 0) {
- continue;
- } else if (depth == 0) {
- menuTree.add(menu);
- } else {
- Map<String, Object> parentMenu = (Map<String, Object>) menuMap.get(parentMenuNo);
- if (parentMenu == null) {
- continue;
- }
- if (!parentMenu.containsKey("ITEMS")) {
- parentMenu.put("ITEMS", new ArrayList<Objects>());
- }
- List<Object> items = (List<Object>) parentMenu.get("ITEMS");
- items.add(menu);
- }
- }
- return menuTree;
- }
- 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/**'
- 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'
- 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.HttpSessionSecurityContextRepository - HttpSession returned null object for SPRING_SECURITY_CONTEXT
- 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.
- 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'
- 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'
- 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'
- 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'
- 08:50:38.465 [http-bio-8080-exec-7] DEBUG c.m.s.s.CustomAuthenticationProcessingFilter - Request is to process authentication
- 08:50:38.465 [http-bio-8080-exec-7] DEBUG o.s.s.authentication.ProviderManager - Authentication attempt using com.mandiri.spring.security.CustomAuthenticationProvider
- 08:50:38.466 [http-bio-8080-exec-7] INFO o.s.s.a.AuthenticationProvider - Welcome authenticate! admin@JJ
- 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
- 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]
- 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/**'
- 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
- 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
- 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
- 08:50:39.030 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
- 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]
- 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
- 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'
- 08:50:39.091 [http-bio-8080-exec-7] DEBUG com.mandiri.hr.sys.dao.UserDao.login - ==> Parameters:
- 08:50:39.113 [http-bio-8080-exec-7] DEBUG com.mandiri.hr.sys.dao.UserDao.login - <== Total: 1
- 08:50:39.114 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@593d7a84]
- 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]
- 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]
- 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]
- 08:50:39.115 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Initiating transaction commit
- 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]
- 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
- 08:50:39.116 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
- 08:50:39.118 [http-bio-8080-exec-7] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
- 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
- 08:50:39.118 [http-bio-8080-exec-7] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'sqlSessionFactory'
- 08:50:39.121 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
- 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]
- 08:50:39.121 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
- 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]
- 08:50:39.139 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Registering transaction synchronization for JDBC Connection
- 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
- 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
- 08:50:39.140 [http-bio-8080-exec-7] DEBUG c.m.h.s.d.MenuDao.getMenuListByUser - ==> Parameters:
- 08:50:39.143 [http-bio-8080-exec-7] DEBUG c.m.h.s.d.MenuDao.getMenuListByUser - <== Total: 171
- 08:50:39.143 [http-bio-8080-exec-7] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@15ae90f6]
- 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]
- 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]
- 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
- 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.j.d.DataSourceTransactionManager - Should roll back transaction but cannot - no transaction available
- 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'
- 08:50:39.143 [http-bio-8080-exec-7] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
- 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/**'
- 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