Announcement Announcement Module
Collapse
No announcement yet.
Spring 3.1 Java Config and Spring Data JPA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.1 Java Config and Spring Data JPA

    Hi all,

    I'm using Spring 3.1 with Java Configuration (Without) XML, has some workaround to get Repositories working without using <jpa:repositories /> on xml configuration?

    I see that already exists a JIRA for Java Config (https://jira.springsource.org/browse/DATAJPA-69)

    Best regards

  • #2
    You can now use the annotation @EnableJpaRepositories("some.root.package") .

    For example:
    Code:
    @Configuration
    @EnableTransactionManagement(proxyTargetClass = true)
    @EnableJpaRepositories("some.root.package")
    @ComponentScan(basePackages = { "maybe.another.root.package" })
    public class SystemConfiguration {
    ...
    }

    Comment

    Working...
    X