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

15th
May 2018
Raja Sundaram
@zeagord
May 15 2018 03:23

I was trying Spring Cloud GCP for non storage services and my project uses a different data store. When I add spring-data-rest to my dependency. I am getting the following error.

Error creating bean with name 'spannerKeyIdConverter' defined in class path resource [org/springframework/cloud/gcp/autoconfigure/spanner/SpannerKeyRestSupportAutoConfiguration.class]

I think seeing the spring-data-rest, Spanner tries to add Auto-configuration. I tried disabling spanner but with no luck.

spring.cloud.gcp.spanner.enabled=false

I had to exclude the autoconfigure classes to make it work.

autoconfigure:
    exclude: org.springframework.cloud.gcp.autoconfigure.spanner.SpannerRepositoriesAutoConfiguration, org.springframework.cloud.gcp.autoconfigure.spanner.SpannerKeyRestSupportAutoConfiguration
---

Demo project could be found here:
https://github.com/zeagord/springboot-gcp.git

I will raise an issue if it is a bug.

vikrantch-hk
@vikrantch-hk
May 15 2018 04:38
@TYsewyn its a non spring boot spring application
vikrantch-hk
@vikrantch-hk
May 15 2018 06:14
team I have given 2 IP addresses of eureka service urls in client but client is not connecting based on same zone
will giving IP in aws wouldn't use preferSameZone flag
Tim Ysewyn
@TYsewyn
May 15 2018 10:38
@vikrantch-hk if I’m not mistaken you could just use @EnableDiscoveryClient, and you’ll be able to use the same properties.
vikrantch-hk
@vikrantch-hk
May 15 2018 11:00
@TYsewyn sorry if the question is not clear. I am running 2 eureka instances in 2 different aws zones and 2 eureka client in respective different aws zones, so client should connect to their respective zone's eureka server but that is not happening
Tim Ysewyn
@TYsewyn
May 15 2018 11:05
I was answering your question of May 11 at 08:16
And that should have been @EnableEurekaClient because you can’t use the @ConditionalOnClass annotation
vikrantch-hk
@vikrantch-hk
May 15 2018 11:12
oh thanks, that I am able to do using netflix eureka-client dependency
can you help with spring cloud eureka configuration for ec2
Tim Ysewyn
@TYsewyn
May 15 2018 11:18
Unfortunately I don’t have any experience with AWS, so I would need to take a look myself
vikrantch-hk
@vikrantch-hk
May 15 2018 12:43
@spencergibb can you please help
CH4:D
@chad_d_stud_twitter
May 15 2018 14:26
@vikrantch-hk it would help if you showed us the application.properties or at least the excerpt from it.
CH4:D
@chad_d_stud_twitter
May 15 2018 15:44

I have the following code:

@FeignClient(name = "service01", fallback = FeignClientFallback.class)
public interface FeignClient {


    @PostMapping("/send")
    EndpointResult<String> send(@RequestBody MyObject request);

    @Component
    static class FeignClientFallback implements FeignClient {


        @Override
        public EndpointResult<String> send(MyObject request) {
            // TODO Auto-generated method stub
            EndpointResult<String> result = new EndpointResult<String>();
            result.setData("no result");
            return result;
        }
    }

}

i confirm service01 is returning a json result consistent with the POJO of EndpointResult but for some reason it’s always calling the fallback method.

I have another identical method (not included here) that has an object as part of its generic argument and for some reason THAT returns a value.

Did I miss anything here?

Tim Ysewyn
@TYsewyn
May 15 2018 15:53
@chad_d_stud_twitter what helped me before is to put the fallback part in comment and try it again
you’ll get a stacktrace with the reason why it’s failing :)
Sushant
@bsushant-athena
May 15 2018 16:13
hi, can somebody explain the setSendZuulResponse() ? what this method does ?
Tim Ysewyn
@TYsewyn
May 15 2018 16:22
hi @bsushant-athena, can you give some more details? which project? which version?
Sushant
@bsushant-athena
May 15 2018 16:28
Zuul RequestContext, spring project
Tim Ysewyn
@TYsewyn
May 15 2018 16:38
looks like that class resides in zuul-core, which is something that is maintained by Netflix
Tim Ysewyn
@TYsewyn
May 15 2018 19:17
@spencergibb I’ve updated the documentation for Spring Cloud ZooKeeper in spring-cloud/spring-cloud-zookeeper#171
Spencer Gibb
@spencergibb
May 15 2018 19:30
:+1: