Results 1 to 4 of 4

Thread: Progmatically definine <jpa:repository>

  1. #1

    Default Progmatically definine <jpa:repository>

    Hi,

    How would you define the following xml using Java @Configuration? I'm in the process of converting most of the existing xml into java based @configuration.

    <jpa:repositories base-package="some repository package" entity-manager-factory-ref="emf" transaction-manager-ref="transactionManager"/>

    Thanks

  2. #2

    Default

    Spring Data JPA 1.2 introduces @EnableJpaRepositories annotation that can be used for this purpose:

    http://static.springsource.org/sprin...es.java-config

    However, at the moment that version is not stable yet. You might be able to create the needed beans manually as well but I would just wait until 1.2 is stable or use the M1 version.

  3. #3

    Default

    whats the alternative? I'm looking for a practice solution.

  4. #4

    Default

    You might want to take a look of this application context configuration class:

    https://bitbucket.org/mikaelhg/proje...iguration.java

    This project is using Spring Data JPA 1.1.0.M1.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •