| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | name: '列表页', |
| | | path: '/list', |
| | | component: './ListTableList', |
| | | routes: [ |
| | | { |
| | | path: '/list/sub-page', |
| | | name: '列表页面', |
| | | routes: [ |
| | | { |
| | | path: '/list/sub-page/sub-sub-page1', |
| | | name: '一级列表页面', |
| | | component: './G6', |
| | | }, |
| | | { |
| | | path: '/list/sub-page/hello', |
| | | name: '你好世界', |
| | | component: './Hello', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | ] |
| | | }, |
| | | } |
| | |
| | | </Routes> |
| | | |
| | | |
| | | {/* <SettingDrawer |
| | | <SettingDrawer |
| | | pathname={pathname} |
| | | enableDarkTheme |
| | | getContainer={(e) => { |
| | |
| | | setSetting(changeSetting); |
| | | }} |
| | | disableUrlParams={false} |
| | | /> */} |
| | | /> |
| | | </ProLayout> |
| | | </ConfigProvider> |
| | | </ProConfigProvider> |
| | |
| | | User user; |
| | | // 白名单 |
| | | if (WHITE_LIST.contains(access_token)) { |
| | | user = userService.getByUsername("super", null); |
| | | user = userService.getByUsername("root", 1L); |
| | | if (user == null) { |
| | | throw new UsernameNotFoundException("Username not found"); |
| | | } |
| | |
| | | } |
| | | } |
| | | } catch (ExpiredJwtException e) { |
| | | e.printStackTrace(); |
| | | HttpUtils.responseError(response, Constants.TOKEN_EXPIRED_CODE, Constants.TOKEN_EXPIRED_MSG, |
| | | e.getMessage()); |
| | | return; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | HttpUtils.responseError(response, Constants.BAD_CREDENTIALS_CODE, Constants.BAD_CREDENTIALS_MSG, |
| | | e.toString()); |
| | | return; |
| | |
| | | public class SecurityConfig extends WebSecurityConfigurerAdapter { |
| | | |
| | | public static final String[] FILTER_PATH = new String[]{ |
| | | "/api/**", |
| | | "/test/**", |
| | | "/api/login", |
| | | "/druid/**", |
| | |
| | | select * |
| | | from sys_role |
| | | where 1=1 |
| | | and role_id in ( |
| | | and id in ( |
| | | select role_id |
| | | from sys_user_role |
| | | where user_id = #{userId} |