通过传递用户名和密码进行spring引导resttemplate api调用

通过传递用户名和密码进行spring引导resttemplate api调用,rest,spring-boot,spring-security,resttemplate,Rest,Spring Boot,Spring Security,Resttemplate,我想从RESTAPI获取数据。。在后端iam中使用spring引导RestInterceptor 错误-- 尝试打印result.getBody(),并提供整个错误堆栈。确保已启动并正在运行。其次,它是Post请求,而您提供的请求主体为null。因此可能引发异常

我想从RESTAPI获取数据。。在后端iam中使用spring引导RestInterceptor

错误--


尝试打印
result.getBody()
,并提供整个错误堆栈。确保已启动并正在运行。其次,它是Post请求,而您提供的请求主体为null。因此可能引发异常