Hi Jonathan,

Thanks for reporting this back! I've decided to start a Spring integration
document on the wiki, based on the existing FAQ question and on this new
tip:

"Integration with Spring"
http://wiki.restlet.org/docs_1.1/g1/43-restlet/59-restlet.html

I have also removed the SpringApplication class which was just a workaround
this configuration question. I think proper documentation is much better. I
might also remove the SpringComponent, SpringHost and SpringServer once I
have a cleaner XML configuration alternative (using <util:list> and
<util:map>).

Best regards,
Jerome  

> -----Message d'origine-----
> De : Jonathan Hall [mailto:[EMAIL PROTECTED] 
> Envoyé : samedi 15 mars 2008 17:35
> À : [email protected]
> Objet : Re: Context param with Directory in Spring
> 
> Oh right I didn't realise, I found it after a little bit of hunting:
> 
> <util:property-path id="appContext" path="application.context"/> 
> 
> cheers,
> Jon
> 
> Jerome Louvel wrote:
> > Hi Jonathan,
> >
> > I think there is a way in Spring to inject a property of a bean
> > ("application.context"), but I can't remember how. 
> >
> > Are there Spring experts reading?
> >
> > Best regards,
> > Jerome  
> >
> >   
> >> -----Message d'origine-----
> >> De : Jonathan Hall [mailto:[EMAIL PROTECTED] 
> >> Envoyé : vendredi 14 mars 2008 21:09
> >> À : [email protected]
> >> Objet : Context param with Directory in Spring
> >>
> >> Hi,
> >>
> >> I'm trying to serve static files using Directory in a Spring 
> >> way, but I have a problem when it comes to the Context param.
> >>
> >> In http://restlet.tigris.org/issues/show_bug.cgi?id=334 
> Jerome wrote:
> >>
> >> "Directory and other classes needing a Context param in 
> >> constructor should also
> >> accept a parent Restlet as well, directly in the API to 
> >> workaround the inability
> >> of Spring to inject a child property taken from another bean."
> >>
> >> This was never implemented, was there another solution found? 
> >> I've tried searching but had no luck.
> >>
> >> At the minute I have it working but extending Directory with:
> >>
> >> public SpringDirectory( Restlet restlet, String rootUri )
> >> {
> >>     super( restlet.getContext(), rootUri );
> >> }
> >>
> >> and using the spring config:
> >>
> >> <bean class="com.blah.SpringDirectory">
> >>     <constructor-arg index="0" ref="application"/>
> >>     <constructor-arg index="1" value="clap://thread/static"/>
> >> </bean>
> >>
> >> Any help appreciated,
> >>
> >> jon
> >>
> >>
> >>     
> >
> >
> >   
> 

Reply via email to