You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by James Carman <ja...@carmanconsulting.com> on 2017/09/19 18:47:33 UTC

SpringBoot and JAX-RS Service Auto Discovery...

I am trying to figure out how to get auto discovery working for generated
JAX-RS proxies.  I looked at the example referenced in the docs, but I keep
getting:

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.apache.cxf.jaxrs.client.spring.JaxRsProxyClientConfiguration':
Injection of autowired dependencies failed; nested exception is
java.lang.IllegalArgumentException: Could not resolve placeholder
'cxf.jaxrs.client.address' in value "${cxf.jaxrs.client.address}"

Any ideas?  Are there any examples I can run that show how to automatically
discover and client load balance between multiple endpoints for another
service?

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by Sergey Beryozkin <sb...@gmail.com>.
Yeah, start Eureka app first, next - the server app, give it few secs 
for Eureka to pick the registrations, run the client...

Sergey
On 20/09/17 07:07, Dennis Kieselhorst wrote:
>> Is there an example project that includes this feature?
>> I must be missing something. What dependency does it
>> need for the eureka stuff to kick in?
> 
> Try this one:
> https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan
> 
> Dennis
> 

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by James Carman <ja...@carmanconsulting.com>.
Ahhh,  The documentation links to that example, but it links directly into
the “application“ directory.  We should change that link to go to the
parent directory.  That way folks would see the whole picture.

On Wed, Sep 20, 2017 at 6:48 AM James Carman <ja...@carmanconsulting.com>
wrote:

> Where did you see that you needed to set the client addresss to
> eureka://registry or whatever?  That looks like it might be the key.  I’ll
> try it later today.  Thanks!
>
> On Wed, Sep 20, 2017 at 2:07 AM Dennis Kieselhorst <de...@apache.org>
> wrote:
>
>> > Is there an example project that includes this feature?
>> > I must be missing something. What dependency does it
>> > need for the eureka stuff to kick in?
>>
>> Try this one:
>>
>> https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan
>>
>> Dennis
>>
>

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by James Carman <ja...@carmanconsulting.com>.
Where did you see that you needed to set the client addresss to
eureka://registry or whatever?  That looks like it might be the key.  I’ll
try it later today.  Thanks!

On Wed, Sep 20, 2017 at 2:07 AM Dennis Kieselhorst <de...@apache.org> wrote:

> > Is there an example project that includes this feature?
> > I must be missing something. What dependency does it
> > need for the eureka stuff to kick in?
>
> Try this one:
>
> https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan
>
> Dennis
>

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by Dennis Kieselhorst <de...@apache.org>.
> Is there an example project that includes this feature?
> I must be missing something. What dependency does it
> need for the eureka stuff to kick in?

Try this one:
https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan

Dennis

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by James Carman <ja...@carmanconsulting.com>.
It’s 3.2.0.  Is there an example project that includes this feature?  I
must be missing something.  What dependency does it need for the eureka
stuff to kick in?

On Tue, Sep 19, 2017 at 4:20 PM Sergey Beryozkin <sb...@gmail.com>
wrote:

> Hi James,
>
> Which CXF version is it ?
>
> I'm pretty sure I run the spring_boot_scan/client few weeks back, with
> 3.2.0, and it worked fine, WebClient and Proxy are used there...
>
> Cheers, Sergey
>
> On 19/09/17 19:47, James Carman wrote:
> > I am trying to figure out how to get auto discovery working for generated
> > JAX-RS proxies.  I looked at the example referenced in the docs, but I
> keep
> > getting:
> >
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name
> > 'org.apache.cxf.jaxrs.client.spring.JaxRsProxyClientConfiguration':
> > Injection of autowired dependencies failed; nested exception is
> > java.lang.IllegalArgumentException: Could not resolve placeholder
> > 'cxf.jaxrs.client.address' in value "${cxf.jaxrs.client.address}"
> >
> > Any ideas?  Are there any examples I can run that show how to
> automatically
> > discover and client load balance between multiple endpoints for another
> > service?
> >
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>

Re: SpringBoot and JAX-RS Service Auto Discovery...

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi James,

Which CXF version is it ?

I'm pretty sure I run the spring_boot_scan/client few weeks back, with 
3.2.0, and it worked fine, WebClient and Proxy are used there...

Cheers, Sergey

On 19/09/17 19:47, James Carman wrote:
> I am trying to figure out how to get auto discovery working for generated
> JAX-RS proxies.  I looked at the example referenced in the docs, but I keep
> getting:
> 
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name
> 'org.apache.cxf.jaxrs.client.spring.JaxRsProxyClientConfiguration':
> Injection of autowired dependencies failed; nested exception is
> java.lang.IllegalArgumentException: Could not resolve placeholder
> 'cxf.jaxrs.client.address' in value "${cxf.jaxrs.client.address}"
> 
> Any ideas?  Are there any examples I can run that show how to automatically
> discover and client load balance between multiple endpoints for another
> service?
> 


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/