Java 锚定标记重定向到无效url
这可能是个愚蠢的问题。但我不知道发生了什么。下面的URL是我在客户应用程序中配置为重定向的示例Java 锚定标记重定向到无效url,java,spring,apache,anchor,Java,Spring,Apache,Anchor,这可能是个愚蠢的问题。但我不知道发生了什么。下面的URL是我在客户应用程序中配置为重定向的示例 <a href="http://cpolo.in/admin/about-us" class="btn_a medium_btn bottom_space"> 我的安全配置是 @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMa
<a href="http://cpolo.in/admin/about-us" class="btn_a medium_btn bottom_space">
我的安全配置是
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/admin/**")
.access("hasAnyRole('SUPER ADMIN','ADMIN','STAFF')").and()
.formLogin().loginPage("/login").failureUrl("/login?error")
.defaultSuccessUrl("/admin/orderdetails")
.usernameParameter("user").passwordParameter("pass").and()
.logout().logoutSuccessUrl("/login?logout").and().csrf().and()
.exceptionHandling().accessDeniedPage("/403").and()
.sessionManagement().invalidSessionUrl("/login");
http.authorizeRequests().antMatchers("/api/**").permitAll().and()
.csrf().disable();
}
我一直在使用SpringMVC、Java8和Apache8服务器。可能是我的错 管理员控制器可能设置为要求对其所有操作进行身份验证。如果您希望“关于我们”可以在全球范围内访问,则需要添加一个例外。我已经用安全配置更新了代码。如果需要进一步的信息,请告诉我
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/admin/**")
.access("hasAnyRole('SUPER ADMIN','ADMIN','STAFF')").and()
.formLogin().loginPage("/login").failureUrl("/login?error")
.defaultSuccessUrl("/admin/orderdetails")
.usernameParameter("user").passwordParameter("pass").and()
.logout().logoutSuccessUrl("/login?logout").and().csrf().and()
.exceptionHandling().accessDeniedPage("/403").and()
.sessionManagement().invalidSessionUrl("/login");
http.authorizeRequests().antMatchers("/api/**").permitAll().and()
.csrf().disable();
}