Skip to content

helpermethod/membrane-spring-boot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Membrane Spring Boot Starter

CircleCI Dependency Status codecov Hex.pm

A Spring Boot Starter for Membrane Service Proxy.

Features

  • seamless integration with Spring Boot
  • typesafe Java 8 DSL for Service Proxy configuration

Example

@EnableMembrane
@SpringBootApplication
public class Application {
    @Bean
    public ProxiesConfiguration proxies() {
        return proxies -> proxies
            .serviceProxy(serviceProxy -> serviceProxy
                .matches(matcher -> matcher.pathPrefix("/restnames/"))
                .target(target -> target.host("www.thomas-bayer.com")));
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}