Spring security+;scratch java扩展
为测试端点的HTTP请求创建刮痕,但是由于设置了spring安全性,因此禁止使用HTTP/1.1 403 如何解决这个问题,我知道每次运行我的项目时,spring security都会生成一个新的密钥,不过可能有一种方法可以让scratch文件获取该密钥或其他什么Spring security+;scratch java扩展,java,spring-security,scratch-file,Java,Spring Security,Scratch File,为测试端点的HTTP请求创建刮痕,但是由于设置了spring安全性,因此禁止使用HTTP/1.1 403 如何解决这个问题,我知道每次运行我的项目时,spring security都会生成一个新的密钥,不过可能有一种方法可以让scratch文件获取该密钥或其他什么 谢谢检查您的网站安全配置课程。我认为您需要如下配置端点: protected void configure(HttpSecurity httpSecurity) throws Exception { httpSecurity.cors
谢谢检查您的
网站安全配置
课程。我认为您需要如下配置端点:
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity.cors();
httpSecurity.csrf().disable();
httpSecurity.authorizeRequests()
.antMatchers(HttpMethod.POST, "/user").permitAll()
.antMatchers(HttpMethod.POST, "/authenticate").permitAll()
//some code
}