Hi

I have actually some difficulty to inject my Dao into my ServerResource. 
Injected Dao is null

This is the bean in my applicationContext.xml : 

    <bean id="protectedApplication" class="MyProtectedApplication">
        <property name="dogsRestResource" ref="dogsRestResource"/>
    </bean>

    <bean id="dogsRestResource" class="DogsRestResource">
        <property name="dogDao" ref="dogDao" />
    </bean>

    <bean id="dogDao" class="lu.sfeir.dao.DogDaoImpl"/>

This is the MyProtectedApplication code :

  private DogsRestResource dogsRestResource; + getter setter

  @Override
  public synchronized Restlet createInboundRoot() {
    Router router = new Router(getContext());
    OAuthAuthorizer auth = new OAuthAuthorizer(
      "http://localhost:8080/oauth/validate";);
    auth.setNext(dogsRestResource.getClass());
    router.attach("/dogs", auth);
    return router;
  }

Anyone can solve my issue please ?

Best regards !

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2993148

Reply via email to