【发布时间】:2016-12-30 13:41:34
【问题描述】:
我有 /my-app/login url,我想为这个 URL 设置 permitAll()。但是这个页面在 /my-app/** 模式下,只允许注册用户访问。
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/my-app/**").access("hasRole('USER')")
.and()
.httpBasic()
.authenticationEntryPoint(entryPoint());
}
怎么做?
【问题讨论】:
标签: spring spring-security basic-authentication