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

6th
Jun 2016
Bartek Andrzejczak
@bandrzejczak
Jun 06 2016 15:48
Does spring-cloud-netflix-sidecar for non-jvm services uses ribbon for load balancing requests to other services, just like ie. I would use feign with ribbon from my jvm service?
Dave Syer
@dsyer
Jun 06 2016 16:08
As I understand it, the sidecar is not an HTTP client for any services. So why would it use Ribbon?
Spencer Gibb
@spencergibb
Jun 06 2016 16:09
It's also a proxy, so that uses ribbon.
David Steiman
@xetys
Jun 06 2016 16:09
yes it is
Dave Syer
@dsyer
Jun 06 2016 16:09
Is it?
Why is it a proxy?
David Steiman
@xetys
Jun 06 2016 16:09
yes, actually i learned to use it with zuulproxy in combination
Spencer Gibb
@spencergibb
Jun 06 2016 16:10
The sidecar
Dave Syer
@dsyer
Jun 06 2016 16:11
@EnableSidecar is @EnableZuulProxy
But why?
The local app uses it to connect to all the other services I guess?
David Steiman
@xetys
Jun 06 2016 16:11
you use it to proxy all registered services to a shared path for your non jvm app, an register itself as an service
Dave Syer
@dsyer
Jun 06 2016 16:12
But you could have a much simpler sidecar that just registered it's companion app and let it get on with things
David Steiman
@xetys
Jun 06 2016 16:12
for rails you say, rails running on port 3000, sidecar on 3030, you call 3030 from the rails app to get other services, and eureka takes the 3030 to registry while redirecting it to 300
3000*
Dave Syer
@dsyer
Jun 06 2016 16:13
Yeah I get it. I just didn't know it was like that by default.
Spencer Gibb
@spencergibb
Jun 06 2016 16:13
Cause that's how I built it :-)
David Steiman
@xetys
Jun 06 2016 16:13
:D
one other question, since here are people who answer: i am really stuck on a super easy task with jackson :(
i just want to declare a custom root element for a entity collection to deserialize.....all I see is defining a wrapper class, or define a complete deserializer and code all fields by my own
isn't there a better way?
like @JsonRootName in Jackson version < 2 ?
Dave Syer
@dsyer
Jun 06 2016 16:17
You posted that question in #spring-boot I think
I don't think it's a good idea to cross post
David Steiman
@xetys
Jun 06 2016 16:17
and got a lot of answers yet :smile:
i note that for the future
Bartek Andrzejczak
@bandrzejczak
Jun 06 2016 16:59
@spencergibb thanks. ;)
Alex Filatov
@sprgn
Jun 06 2016 17:08
Anyone have an example of how to add some custom url resource mappings for specific resources served up by config server? I've tried defining another WebMvcConfigurerAdapter with addResourceHandlers but no luck. Thanks in advance.
Dave Syer
@dsyer
Jun 06 2016 17:21
There's already a resource handler for the normal spring boot paths
What are the resources?
Are they in the jar file?
Alex Filatov
@sprgn
Jun 06 2016 18:21
No, just some static xml files I'm serving via config server using the Plain Text method /{name}/{profile}/{label}/{path} I just want to provide a simpler path to those files (they are under trunk(_)static directory structure)
Dave Syer
@dsyer
Jun 06 2016 18:32
I'm not really sure I follow. Can't you just use a regular MVC request mapping with a forward to the full path?
Alex Filatov
@sprgn
Jun 06 2016 18:37
That's what I was trying with my own WebMvcConfigurerAdapter and addResourceHandlers(), but can't get it to work. Sorry if I should be asking this in the spring-boot channel.
Dave Syer
@dsyer
Jun 06 2016 18:40
A resource handler is for static resources
This is a forward to an existing path
Look at the Spring MVC docs for details
Alex Filatov
@sprgn
Jun 06 2016 18:42
@dsyer thanks. Yes, you are correct. That's why my addResourceHandlers wasn't working. It works with WebMvcConfigurerAdapter.addViewControllers(