Spring security authorize request for url & method using HttpSecurity

前端 未结 3 388
不思量自难忘°
不思量自难忘° 2020-12-28 12:49

Is there any way to authorize post request to a specific url using org.springframework.security.config.annotation.web.builders.HttpSecurity ?

I\'m usin

3条回答
  •  情歌与酒
    2020-12-28 13:27

    Just Mention the path you need to remove Authentication like this

        http
           .httpBasic().and()
           .authorizeRequests()
           .antMatchers("/employees" , "/employees/**")
           .permitAll().anyRequest().authenticated()
           .and().csrf().disable()
    

提交回复
热议问题