Announcement Announcement Module
Collapse
No announcement yet.
Spring Roo implementation of Spring Data clobbers Spring Social config, right? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo implementation of Spring Data clobbers Spring Social config, right?

    I would like to implement Spring Data and Spring Social in the same Roo project.

    But I think Spring Data is corrupting the Spring Social config:

    - I have a Roo project working with Spring Social (set up similar to Social Showcase)
    - then run the Roo command
    Code:
    repository jpa --interface ~.domain.NAME --entity ~.domain.NAME
    - then at compile time I get

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'socialConfig': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.ibp.c045.social.account.JdbcAccountRepository com.ibp.c045.social.config.SocialConfig.accountRepository; nested exception is java.lang.IllegalArgumentException: Can not set com.ibp.c045.social.account.JdbcAccountRepository field com.ibp.c045.social.config.SocialConfig.accountRepository to $Proxy351
    - this is caused by
    Code:
    @Inject	
    JdbcAccountRepository accountRepository;
    in SocialConfig.java, which I am doing to implement implicit signon.

    It seems if you change the JdbcAccountRepository to its interface that problem goes away, but that breaks other things, obviously.

    Does anyone have Spring Data and Spring Social working in a Roo project? If so, how?

  • #2
    I've not done this, but on the surface it looks like a quirk with the Spring Data plugin. Those plugins shouldn't clobber the work done by another plugin or by the developer.

    Comment

    Working...
    X