Java 在运行集成测试时忽略gRPC全局拦截器

Java 在运行集成测试时忽略gRPC全局拦截器,java,spring-boot,security,authentication,grpc,Java,Spring Boot,Security,Authentication,Grpc,我有一个@GRpcGlobalInterceptor(AuthenticationInterceptor),它应用于所有服务。 如何在运行集成测试时忽略AuthenticationInterceptor 我尝试了以下选项,但没有成功。非常感谢你的帮助。谢谢 @配置 @Slf4j 公共类GrpcServerConfig{ @豆子 @GRpcGlobalInterceptor 公共服务器侦听器globalInterceptor(){ 返回新的AuthenticationInterceptor();

我有一个@GRpcGlobalInterceptor(AuthenticationInterceptor),它应用于所有服务。 如何在运行集成测试时忽略AuthenticationInterceptor

我尝试了以下选项,但没有成功。非常感谢你的帮助。谢谢

@配置
@Slf4j
公共类GrpcServerConfig{
@豆子
@GRpcGlobalInterceptor
公共服务器侦听器globalInterceptor(){
返回新的AuthenticationInterceptor();
}
}
GrpcBaseTestConfig

@TestConfiguration
@ComponentScan(basePackages=“com.example”,
excludeFilters=@ComponentScan.Filter(type=FilterType.ASSIGNABLE_type,class={GrpcServerConfig.class}))
公共类GrpcBaseTestConfig{
}
集成测试类

@Import(GrpcBaseTestConfig.class)
@春靴测试(
属性={“grpc.inProcessServerName=ApplicationGPCServiceTest”})
公共类应用程序RPCServiceTest{
私有应用程序服务GRPC.ApplicationServiceBlockingStub应用程序服务客户端;
专用管理通道;
@之前
公共作废设置(){
channel=InProcessChannelBuilder.forName(“applicationRPCServiceTest”).usePlaintext().build();
applicationServiceClient=ApplicationServiceGrpc.newBlockingStub(通道).withInterceptors();
}
@之后
公共空间关闭(){
通道关闭();
}
@试验
void addNewApplicationTest(){
applicationServiceClient.createApplication(新应用程序());
}
}