demo前端模版添加
This commit is contained in:
@@ -29,7 +29,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests()//配置权限
|
||||
// .antMatchers("/").access("hasRole('TEST')")//该路径需要TEST角色
|
||||
// .antMatchers("/brand/list").authenticated()//该路径需要登录认证
|
||||
.antMatchers("/").authenticated()//该路径需要登录认证
|
||||
// .antMatchers("/brand/list").hasAuthority("TEST")//该路径需要TEST权限
|
||||
.antMatchers("/**").permitAll()
|
||||
.and()//启用基于http的认证
|
||||
@@ -48,6 +48,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
// .key("rememberMeKey")
|
||||
.and()//关闭跨域伪造
|
||||
.csrf()
|
||||
.disable()
|
||||
.headers()//去除X-Frame-Options
|
||||
.frameOptions()
|
||||
.disable();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,17 @@ spring.datasource.password=root
|
||||
mybatis.mapper-locations=classpath:mapper/*.xml,classpath*:com/**/mapper/*.xml
|
||||
|
||||
#<23><>־<EFBFBD><D6BE><EFBFBD><EFBFBD>DEBUG,INFO,WARN,ERROR
|
||||
logging.level.root=warn
|
||||
logging.level.root=info
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>
|
||||
logging.level.com.macro.mall=debug
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
||||
#logging.path=/var/logs
|
||||
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
#logging.file=demo_log.log
|
||||
#logging.file=demo_log.log
|
||||
#thymeleaf start
|
||||
spring.thymeleaf.mode=HTML5
|
||||
spring.thymeleaf.encoding=UTF-8
|
||||
spring.thymeleaf.content-type=text/html
|
||||
#<23><><EFBFBD><EFBFBD>ʱ<EFBFBD>رջ<D8B1><D5BB><EFBFBD>,<2C><>Ȼû<C8BB><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵʱҳ<CAB1><D2B3>
|
||||
spring.thymeleaf.cache=false
|
||||
#thymeleaf end
|
||||
Reference in New Issue
Block a user