Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 锚定标记重定向到无效url_Java_Spring_Apache_Anchor - Fatal编程技术网

Java 锚定标记重定向到无效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

这可能是个愚蠢的问题。但我不知道发生了什么。下面的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().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();

}