Announcement Announcement Module
Collapse
No announcement yet.
Bean not injected Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bean not injected

    Hi!
    I'm having a problem with a bean that doesn't get injected into one of my classes.

    The class extends AbstractView implements ActionListener, ApplicationListener, ExecutorParent. AbstractView implements ActionListener, ApplicationListener, ExecutorParent<Image>
    It has some services that are defined in client-context.xml like this:
    Code:
    <bean id="articleService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
            <property name="serviceUrl" value="https://${serverName}:${httpPort}${contextPath}/articleService"/>
            <property name="serviceInterface" value="no.dusken.pegadi.service.ArticleService"/>
        </bean>
    I want to add a controller to handle search, so i made a class that uses compass to do search.
    The problem is that the bean doesnt get injected. The controller is defined just like all the other services that do get injected.
    And the searchController bean is made, i can reach it through getApplicationContext().
    Anyone have any idea what can be the cause of this?

  • #2
    It seems it was a naming mistake, a typo. The setter must have the same name as the field for injection to work. I think it should work now.

    Comment

    Working...
    X