Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
e2139687
Commit
e2139687
authored
Oct 21, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正菜单状态注释信息
parent
b67f6a0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
SysMenu.java
...ain/java/com/ruoyi/common/core/domain/entity/SysMenu.java
+1
-1
ResourcesConfig.java
...main/java/com/ruoyi/framework/config/ResourcesConfig.java
+3
-1
SecurityConfig.java
.../main/java/com/ruoyi/framework/config/SecurityConfig.java
+3
-3
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
View file @
e2139687
...
@@ -54,7 +54,7 @@ public class SysMenu extends BaseEntity
...
@@ -54,7 +54,7 @@ public class SysMenu extends BaseEntity
/** 显示状态(0显示 1隐藏) */
/** 显示状态(0显示 1隐藏) */
private
String
visible
;
private
String
visible
;
/** 菜单状态(0
显示 1隐藏
) */
/** 菜单状态(0
正常 1停用
) */
private
String
status
;
private
String
status
;
/** 权限字符串 */
/** 权限字符串 */
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
View file @
e2139687
package
com
.
ruoyi
.
framework
.
config
;
package
com
.
ruoyi
.
framework
.
config
;
import
java.util.concurrent.TimeUnit
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.CacheControl
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
import
org.springframework.web.filter.CorsFilter
;
import
org.springframework.web.filter.CorsFilter
;
...
@@ -34,7 +36,7 @@ public class ResourcesConfig implements WebMvcConfigurer
...
@@ -34,7 +36,7 @@ public class ResourcesConfig implements WebMvcConfigurer
/** swagger配置 */
/** swagger配置 */
registry
.
addResourceHandler
(
"/swagger-ui/**"
)
registry
.
addResourceHandler
(
"/swagger-ui/**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/springfox-swagger-ui/"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/springfox-swagger-ui/"
)
.
setCacheControl
(
CacheControl
.
maxAge
(
1
,
TimeUnit
.
DAYS
).
mustRevalidate
().
cachePrivate
()).
resourceChain
(
true
)
;
.
setCacheControl
(
CacheControl
.
maxAge
(
5
,
TimeUnit
.
HOURS
).
cachePublic
());
;
}
}
/**
/**
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
e2139687
...
@@ -102,6 +102,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -102,6 +102,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
httpSecurity
httpSecurity
// CSRF禁用,因为不使用session
// CSRF禁用,因为不使用session
.
csrf
().
disable
()
.
csrf
().
disable
()
// 禁用HTTP响应标头
.
headers
().
cacheControl
().
disable
().
and
()
// 认证失败处理类
// 认证失败处理类
.
exceptionHandling
().
authenticationEntryPoint
(
unauthorizedHandler
).
and
()
.
exceptionHandling
().
authenticationEntryPoint
(
unauthorizedHandler
).
and
()
// 基于token,所以不需要session
// 基于token,所以不需要session
...
@@ -109,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -109,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
// 过滤请求
.
authorizeRequests
()
.
authorizeRequests
()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
).
anonymous
()
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
).
permitAll
()
// 静态资源,可匿名访问
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
...
@@ -124,8 +126,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -124,8 +126,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 添加CORS filter
// 添加CORS filter
httpSecurity
.
addFilterBefore
(
corsFilter
,
JwtAuthenticationTokenFilter
.
class
);
httpSecurity
.
addFilterBefore
(
corsFilter
,
JwtAuthenticationTokenFilter
.
class
);
httpSecurity
.
addFilterBefore
(
corsFilter
,
LogoutFilter
.
class
);
httpSecurity
.
addFilterBefore
(
corsFilter
,
LogoutFilter
.
class
);
// 禁用缓存
httpSecurity
.
headers
().
cacheControl
().
disable
();
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment