Skip to content

leejoker/feign-dev-tool-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feign dev tool

This is a debug-tool for feign users. You can use it to specify a consul server without changing the class with an FeignClient annotation.

Install

git clone https://github.com/leejoker/feign-dev-tool-starter.git

cd feign-dev-tool-starter

mvn install

How to use

1.add dependency in you pom.xml

<dependency>
    <groupId>io.github.leejoker</groupId>
    <artifactId>feign-dev-tool-starter</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

2.config the application.yml

# add feign-tool config
feign-tool:
  consul:
    host: 127.0.0.1
    port: 8500
    dataCenter: dc1
    excludes: user-service, push-service
  redirects:
    demo-service:
      url: http://localhost:8989/demo

3.add the package to your ComponentScan annotation

@EnableFeignClients
@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan(basePackages = {"your package paths","io.github.leejoker"})
public class DemoApplication {
	public static void main(String[] args) {
		new SpringApplicationBuilder().sources(DemoApplication.class).run(args);
	}
}

About

a tool to modify url for your FeignClient

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages