【发布时间】:2020-03-09 22:55:02
【问题描述】:
@ReactiveFeignClient(name = "service.b",configuration = CustomConfiguration.class)
public interface FeingConfiguration {
@PostMapping("/api/students/special")
public Flux<Student> getAllStudents(@RequestBody Flux<SubjectStudent> lista);
}
帮助,如何向我在服务中的标头添加基本身份验证:service.b。 我有 CustomConfiguration.class 类但它不允许我,我有 401 授权失败
@Configuration
public class CustomConfiguration {
@Bean
public BasicAuthRequestInterceptor basic() {
return new BasicAuthRequestInterceptor("user","user") ;
}
【问题讨论】:
标签: spring-boot security spring-webflux spring-cloud-feign