Enable and allow access to h2-console
This commit is contained in:
parent
3f7a756746
commit
7e9b018d7e
@ -36,7 +36,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.antMatchers(HttpMethod.GET, "/articles/feed").authenticated()
|
.antMatchers(HttpMethod.GET, "/articles/feed").authenticated()
|
||||||
.antMatchers(HttpMethod.POST, "/users", "/users/login").permitAll()
|
.antMatchers(HttpMethod.POST, "/users", "/users/login").permitAll()
|
||||||
.antMatchers(HttpMethod.GET, "/articles/**", "/profiles/**", "/tags").permitAll()
|
.antMatchers(HttpMethod.GET, "/articles/**", "/profiles/**", "/tags").permitAll()
|
||||||
.anyRequest().authenticated();
|
.antMatchers("/h2-console", "/h2-console/**")
|
||||||
|
.permitAll()
|
||||||
|
.anyRequest().authenticated()
|
||||||
|
.and()
|
||||||
|
.headers().frameOptions().sameOrigin();
|
||||||
|
|
||||||
http.addFilterBefore(jwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
http.addFilterBefore(jwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||||
}
|
}
|
||||||
|
@ -4,4 +4,5 @@ jwt.secret=nRvyYC4soFxBdZ-F-5Nnzz5USXstR1YylsTd-mA0aKtI9HUlriGrtkf-TiuDapkLiUCog
|
|||||||
jwt.sessionTime=86400
|
jwt.sessionTime=86400
|
||||||
mybatis.config-location=classpath:mybatis-config.xml
|
mybatis.config-location=classpath:mybatis-config.xml
|
||||||
mybatis.mapper-locations=mapper/*.xml
|
mybatis.mapper-locations=mapper/*.xml
|
||||||
logging.level.io.spring.infrastructure.mybatis.readservice.ArticleReadService=DEBUG
|
logging.level.io.spring.infrastructure.mybatis.readservice.ArticleReadService=DEBUG
|
||||||
|
spring.h2.console.enabled=true
|
Loading…
Reference in New Issue
Block a user