These are chat archives for spring-cloud/spring-cloud

25th
Oct 2017
Sushant Borse
@sushant91265_twitter
Oct 25 2017 06:44
Hi all, can somebody please provide some info/docs on tuning zuul for the api-gateway ?
Simen Skoglund
@skogie
Oct 25 2017 07:16
@mp911de yeah seems like the exact issue. Upgrading to M5 gives me a new error 2017-10-25 09:11:20.623 WARN 36464 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy which crashes the application. I'm also getting Failed to introspect annotations on [class org.springframework.cloud.vault.config.VaultHealthIndicatorConfiguration$$EnhancerBySpringCGLIB$$4e4ce3cc]: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxywhich might cause the problems
Everything runs fine when im omitting the actuator dependency though: <artifactId>spring-boot-starter-actuator</artifactId>
Mark Paluch
@mp911de
Oct 25 2017 10:15
@skogie Upgrade to snapshots for now. Currently, all the various milestones are broken. With Finchley M3, we'll fix compatibility again.
Lukas Raska
@DarkKnightCZ
Oct 25 2017 10:18
Hi, what could be reason of Zuul not adding Authorization token to upstream? I have project with @EnableOAuth2Sso , requests via zuul are working, but Bearer token is not added into the requests... any ideas? Thanks
Dave Syer
@dsyer
Oct 25 2017 10:38
How do you mean "working"?
If the token is not added it's not working I guess
Did you add the spring-cloud-security oauth2 bits to your classpath?
Lukas Raska
@DarkKnightCZ
Oct 25 2017 10:47
(facepalm) yeah, that helped :) thanks @dsyer
Andrew Fitzgerald
@fitzoh
Oct 25 2017 13:49
@spencergibb what’s the difference between 1.x and 2.x of spring-cloud-gateway? boot 1 vs boot 2?
Spencer Gibb
@spencergibb
Oct 25 2017 13:49
yes, gateway 1.x has some functionality for spring-cloud-function is all. Most advertised functionality is in 2.0.x
Andrew Fitzgerald
@fitzoh
Oct 25 2017 13:51
cool, thanks
Andrew Fitzgerald
@fitzoh
Oct 25 2017 17:01

@spencergibb are there any known issues with proxying to https sites?

                .route("http")
                .uri("http://reddit.com:80")
                .predicate(path("/http"))
                .and()
                .route("https")
                .uri("https://reddit.com:443")
                .predicate(path("/https"))
                .and()
                .build();

/http works, /https returns an instant 200 w/ no content

looks like it was after the latest milestone, any ETA on v2m3?
Spencer Gibb
@spencergibb
Oct 25 2017 17:05
hopefully this week
Andrew Fitzgerald
@fitzoh
Oct 25 2017 17:10
:+1:
Andrew Fitzgerald
@fitzoh
Oct 25 2017 17:37
One more question… Is there an easy way to do something like this:
spring:
  cloud:
    gateway:
      routes:
        id: myservice
        uri: ${myservice.url}
        path: /myservice
So
spring:
  cloud:
    gateway:
      routes:
        id: myservice
        uri: ${myservice.url}
        predicates:
        - Path=/myservice
Andrew Fitzgerald
@fitzoh
Oct 25 2017 18:02
cool