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
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>
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'
}
application.yml:echo:
proxy:
enabled: true
@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);
Echo Proxy is © 2024 by Akli REGUIG.
Echo Proxy is distributed under the MIT License.