Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.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 &引用;未经授权:访问此资源需要完全身份验证”;启动应用程序时_Java_Reactjs_Spring Boot_Jhipster - Fatal编程技术网

Java &引用;未经授权:访问此资源需要完全身份验证”;启动应用程序时

Java &引用;未经授权:访问此资源需要完全身份验证”;启动应用程序时,java,reactjs,spring-boot,jhipster,Java,Reactjs,Spring Boot,Jhipster,这有点烦人,因为我已经解决了最初的问题(就是这个),但现在这是另一件我自己无法调试的事情 我正在为我的项目使用JHIPSTER 6.10(Spring Boot 2.2.7.RELEASE)+React。我最近开始需要使用实体作为目录(这样管理员就可以轻松地管理它们),并且需要在注册页面上使用它们。我的第一个问题是,它们不会显示注册表页面中的下拉列表,但这个问题与SecurityConfiguration.java有关,因此我添加了允许所有实体的实体: .antMatchers("/a

这有点烦人,因为我已经解决了最初的问题(就是这个),但现在这是另一件我自己无法调试的事情

我正在为我的项目使用JHIPSTER 6.10(Spring Boot 2.2.7.RELEASE)+React。我最近开始需要使用实体作为目录(这样管理员就可以轻松地管理它们),并且需要在注册页面上使用它们。我的第一个问题是,它们不会显示注册表页面中的下拉列表,但这个问题与
SecurityConfiguration.java
有关,因此我添加了允许所有实体的实体:

.antMatchers("/api/comunidad-famdals").permitAll()
.antMatchers("/api/ciudads").permitAll()
.antMatchers("/api/estados").permitAll()
.antMatchers("/api/ladrillo-famdals").permitAll()
.antMatchers("/api/pais").permitAll()
.antMatchers("/api/**").authenticated()
这似乎很好,但在我第一次加载应用程序(在开发模式下)时,它会抛出下一个错误:

2020-10-09 02:03:33.337 DEBUG 63312 --- [  XNIO-1 task-9] c.f.m.r.CustomAuditEventRepository       : Enter: add() with argument[s] = [AuditEvent [timestamp=2020-10-09T07:03:33.302498Z, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]
2020-10-09 02:03:33.342 DEBUG 63312 --- [  XNIO-1 task-9] c.f.m.r.CustomAuditEventRepository       : Exit: add() with result = null
2020-10-09 02:03:33.473  WARN 63312 --- [  XNIO-1 task-9] o.z.problem.spring.common.AdviceTraits   : Unauthorized: Full authentication is required to access this resource
2020-10-09 02:03:33.564  WARN 63312 --- [  XNIO-1 task-9] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource]
当尝试注册时,下拉列表仍然没有显示任何内容:

但是,如果我再次回家,终端会显示所有查询都已正确完成,如果我返回到注册页面,则可以肯定:


我想知道我的
SecurityConfiguration.java是否遗漏了一些东西,或者配置的顺序是否需要不同才能正常工作。

我也有类似的问题,阅读jhipster的其他文章似乎很常见。你解决了吗?@funder7我不再参与我正在进行的这个项目,但我无法解决它。很抱歉如果我的内存工作正常,那是因为请求Url中有一个空格,没有与spring security匹配:-)