Skip to content

io microsphere spring cloud openfeign components NoOpRequestInterceptor

github-actions[bot] edited this page Jun 10, 2026 · 5 revisions

NoOpRequestInterceptor

Type: Class | Module: microsphere-spring-cloud-openfeign | Package: io.microsphere.spring.cloud.openfeign.components | Since: 0.0.1

Source: microsphere-spring-cloud-openfeign/src/main/java/io/microsphere/spring/cloud/openfeign/components/NoOpRequestInterceptor.java

Overview

NoOpRequestInterceptor is a class in the io.microsphere.spring.cloud.openfeign.components package of the microsphere-spring-cloud-openfeign module.

Declaration

public class NoOpRequestInterceptor implements RequestInterceptor

Author: 韩超

Version Information

  • Introduced in: 0.0.1
  • Current Project Version: 0.2.18-SNAPSHOT

Version Compatibility

This component is tested and compatible with the following Java versions:

Java Version Status
Java 17 ✅ Compatible
Java 21 ✅ Compatible
Java 25 ✅ Compatible

Examples

Method Examples

apply

RequestInterceptor noOp = NoOpRequestInterceptor.INSTANCE;
noOp.apply(requestTemplate); // does nothing
NoOpRequestInterceptor.INSTANCE.apply(requestTemplate);

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-spring-cloud-openfeign</artifactId>
    <version>${microsphere-spring-cloud.version}</version>
</dependency>

Tip: Use the BOM (microsphere-spring-cloud-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.spring.cloud.openfeign.components.NoOpRequestInterceptor;

API Reference

Public Methods

Method Description
apply A no-operation RequestInterceptor that does nothing when applied.

Method Details

apply

public void apply(RequestTemplate template)

A no-operation RequestInterceptor that does nothing when applied. Used as a placeholder to ensure at least one interceptor is registered.

Example Usage:

`RequestInterceptor noOp = NoOpRequestInterceptor.INSTANCE;
noOp.apply(requestTemplate); // does nothing
`

/ public static final NoOpRequestInterceptor INSTANCE = new NoOpRequestInterceptor();

/** Applies this interceptor to the given RequestTemplate. This implementation intentionally performs no operation.

Example Usage:

`NoOpRequestInterceptor.INSTANCE.apply(requestTemplate);
`

This documentation was auto-generated from the source code of microsphere-spring-cloud.

Home

spring-cloud-commons

spring-cloud-openfeign

Clone this wiki locally