1
Application.java봄 구름 - Zuul 서버 오류
@Configuration
@ComponentScan
@EnableAutoConfiguration
@EnableZuulProxy
public class ZuulServer {
public static void main(String[] args) {
SpringApplication.run(ZuulServer.class, args);
}
}
application.yml
eureka:
client:
enabled: true
serviceUrl:
defaultZone: http://localhost:8761/v2/
zuul:
proxy:
route:
service1: /myservice1
service2: /myservice2
예 호출
http://localhost:8080/proxy/myservice1/users
http://localhost:8080/proxy/myservice2/auctionlots/today
Predecoration 필터 (1.0을 사용하는데 다음과 같은 오류를 라우팅하는 동안 작동 .0.M2) :
Caused by: java.lang.NoSuchMethodError: com.netflix.hystrix.HystrixExecutableBase$ObservableCommand.toBlocking()Lrx/observables/BlockingObservable;
at com.netflix.hystrix.HystrixExecutableBase.queue(HystrixExecutableBase.java:342)
at com.netflix.hystrix.HystrixObservableCommand.queue(HystrixObservableCommand.java:50)
at com.netflix.hystrix.HystrixExecutableBase.execute(HystrixExecutableBase.java:296)
at com.netflix.hystrix.HystrixObservableCommand.execute(HystrixObservableCommand.java:50)
at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:485)
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:162)
at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:86)
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112)
at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:197)
... 41 common frames omitted