Echo Proxy

A Spring Boot starter that provides a configurable proxy/mock server for easily mocking external services or proxying requests.

Get started now View it on GitHub


Getting Started

Installation

Maven

Add the GitHub Packages repository and dependency to your pom.xml:

<repositories>
    <repository>
        <id>github</id>
        <name>GitHub areguig Apache Maven Packages</name>
        <url>https://maven.pkg.github.com/areguig/spring-boot-starter-echo-proxy</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>io.github.areguig</groupId>
        <artifactId>spring-boot-starter-echo-proxy</artifactId>
        <version>0.1.0-SNAPSHOT</version>
    </dependency>
</dependencies>

Gradle

Add the GitHub Packages repository and dependency to your build.gradle:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/areguig/spring-boot-starter-echo-proxy")
    }
}

dependencies {
    implementation 'io.github.areguig:spring-boot-starter-echo-proxy:0.1.0-SNAPSHOT'
}

Quick Start

  1. Enable the proxy in your application.yml:
echo:
  proxy:
    enabled: true
  1. Create a mock endpoint:
@Autowired
private ConfigurationStorage configStorage;

ProxyConfig mockConfig = new ProxyConfig();
mockConfig.setUrlPattern("/api/test");
mockConfig.setMode(ProxyMode.MOCK);
mockConfig.setMethod(HttpMethod.GET);
mockConfig.setResponseBody("{\"message\":\"test\"}");
mockConfig.setStatusCode(200);
mockConfig.setActive(true);
configStorage.addConfig(mockConfig);

About the project

Echo Proxy is © 2024 by Akli REGUIG.

License

Echo Proxy is distributed under the MIT License.