"ERROR" dispatch for POST "/error?userId=1", parameters={masked}

前言

错误信息

2020-01-10 08:41:13.827 DEBUG 12796 --- [gistrationTask1] o.s.web.client.RestTemplate              : HTTP POST http://localhost:9004/instances
2020-01-10 08:41:13.827 DEBUG 12796 --- [gistrationTask1] o.s.web.client.RestTemplate              : Accept=[application/json, application/*+json]
2020-01-10 08:41:13.827 DEBUG 12796 --- [gistrationTask1] o.s.web.client.RestTemplate              : Writing [Application(name=core-server-user, managementUrl=http://DESKTOP-SLABIS6:10002/actuator, healthUrl=http://DESKTOP-SLABIS6:10002/actuator/health, serviceUrl=http://DESKTOP-SLABIS6:10002/)] as "application/json"
2020-01-10 08:41:14.476 DEBUG 12796 --- [io-10002-exec-1] o.s.web.servlet.DispatcherServlet        : "ERROR" dispatch for POST "/error?userId=1", parameters={masked}
2020-01-10 08:41:14.476 DEBUG 12796 --- [io-10002-exec-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest)
2020-01-10 08:41:14.477 DEBUG 12796 --- [io-10002-exec-1] o.s.w.s.m.m.a.HttpEntityMethodProcessor  : Using 'application/json;charset=UTF-8', given [application/json;charset=UTF-8] and supported [application/json, application/*+json, application/json, application/*+json]
2020-01-10 08:41:14.477 DEBUG 12796 --- [io-10002-exec-1] o.s.w.s.m.m.a.HttpEntityMethodProcessor  : Writing [{timestamp=Fri Jan 10 08:41:14 CST 2020, status=403, error=Forbidden, message=Forbidden, path=/query (truncated)...]
2020-01-10 08:41:14.478 DEBUG 12796 --- [io-10002-exec-1] o.s.web.servlet.DispatcherServlet        : Exiting from "ERROR" dispatch, status 403

解决办法

首先赞一句,谷歌牛批。
解决过程
1.首先根据错误提示ERROR" dispatch for POST “/error?userId=1”, parameters={masked}在百度进行搜索。


但是他并没说怎么配置。没用啊,所以继续搜索。
2. 打开谷歌,输入内容。选中第一条。

不管像不像,无所谓了,直接点进去看呗

我的服务里面确实引入了spring security,也加了放开所有权限。

但是下面关于cors 和 csrf的没加。加上之后,断点调试。就可以进入方法了。
现在返回成功。

你可能感兴趣的:(后端问题)