fix: add getAppIndexInfo to anonymous access and fix SQL schema
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,7 +109,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||
// 过滤请求
|
||||
.authorizeRequests()
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login","/appLogin","/system/msm","/smsLogin", "/register", "/captchaImage","/weixinLogin","/getUserToken","/system/weixin/wxPayNotify","/system/weixin/wxRefundNotify").anonymous()
|
||||
.antMatchers("/login","/appLogin","/system/msm","/smsLogin", "/register", "/captchaImage","/weixinLogin","/getUserToken","/system/weixin/wxPayNotify","/system/weixin/wxRefundNotify","/system/user/getAppIndexInfo").anonymous()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
|
||||
@@ -25,8 +25,8 @@ INSERT INTO rlz_nursing_article (title, image_url, article_url, sort_order, stat
|
||||
-- 假设"系统管理"菜单ID为1,如果没有则通过子查询获取
|
||||
SET @parent_id = (SELECT menu_id FROM sys_menu WHERE menu_name = '系统管理' AND parent_id = 0 LIMIT 1);
|
||||
|
||||
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
|
||||
SELECT '护理资讯', IFNULL(@parent_id, 1), 6, 'nursing', 'system/nursing/index', NULL, NULL, 1, 0, 'C', '0', '0', 'system:nursing:list', 'education', 'admin', NOW()
|
||||
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
|
||||
SELECT '护理资讯', IFNULL(@parent_id, 1), 6, 'nursing', 'system/nursing/index', 1, 0, 'C', '0', '0', 'system:nursing:list', 'education', 'admin', NOW()
|
||||
FROM DUAL
|
||||
WHERE NOT EXISTS (SELECT 1 FROM sys_menu WHERE menu_name = '护理资讯' AND parent_id = IFNULL(@parent_id, 1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user