Announcement Announcement Module
Collapse
No announcement yet.
Default Bean Naming Conventions Seemed to have changed. Now fully qualified? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default Bean Naming Conventions Seemed to have changed. Now fully qualified?

    I must be missing a configuration or something but for some reason by beans are not being named according to their camelCase'd class name but rather a fully qualified java class name. Does anyone know why this is happening to me?

    e.g.
    WebApplicationContextUtils.getWebApplicationContex t(context).getBean("tokenBasedRememberMeServices")
    gives me a

    org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'tokenBasedRememberMeServices' is defined
    In other words

    System.out.println WebApplicationContextUtils.getWebApplicationContex t(context).getBeansOfType(RememberMeServices.class ).toString()
    returns:

    [org.springframework.security.web.authentication.re memberme.TokenBasedRememberMeServices#0:org.spring framework.security.web.authentication.rememberme.T okenBasedRememberMeServices@4b8da1c6]
    So the bean name is
    org.springframework.security.web.authentication.re memberme.TokenBasedRememberMeServices

    and not tokenBasedRememberMeServices

    This seems to be happening to all my beans that I don't assign a name or an id attribute.
    Last edited by scottland; Dec 3rd, 2012, 07:56 PM.

  • #2
    Forgot to mention, I am using Spring 3.1.3.RELEASE

    Comment

    Working...
    X