Spring Data Commons
  1. Spring Data Commons
  2. DATACMNS-47

Support Java-based Configuration of Repositories

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 Final
    • Fix Version/s: 1.4 M1
    • Component/s: Repositories
    • Labels:
      None

      Description

      Add RepositoryFactoryBuilder that would allow for easily configuring repositories using Spring's Java-based configuration. See forum reference for details.

        Issue Links

          Activity

          Hide
          Brandon M. added a comment -

          Any updates or thoughts on viability of adding this support in near future?

          Show
          Brandon M. added a comment - Any updates or thoughts on viability of adding this support in near future?
          Hide
          Michael Andrews added a comment -

          This is really the only thing missing for basic repository configuration to be fully in java. +1.

          Show
          Michael Andrews added a comment - This is really the only thing missing for basic repository configuration to be fully in java. +1.
          Hide
          Michael Andrews added a comment -

          E.g., Have the mongo:repositories, jpa:repositories (etc.) XML definitions - available in java - to be used in @Configuration classes.

          Show
          Michael Andrews added a comment - E.g., Have the mongo:repositories, jpa:repositories (etc.) XML definitions - available in java - to be used in @Configuration classes.
          Hide
          Oliver Gierke added a comment -

          Have a look at DATAJPA-69 for an example of what you can do right now already. Similar thing could be done for the MongoDB module. I recommend setting up a helper method to include the meat of the configuration so that the @Bean methods basically only contain a call to that method piping in the repo interface.

          Show
          Oliver Gierke added a comment - Have a look at DATAJPA-69 for an example of what you can do right now already. Similar thing could be done for the MongoDB module. I recommend setting up a helper method to include the meat of the configuration so that the @Bean methods basically only contain a call to that method piping in the repo interface.
          Hide
          Oliver Gierke added a comment -

          I've just published a first draft of the support into feature branches. The store specific implementations can be found in feature branches named after the ticket as listed above. To try out the feature refer to the library using JAVACONFIG-SNAPSHOT as version suffix (e.g. for Spring Data JPA - 1.2.0.JAVACONFIG-SNAPSHOT). The annotations are named @EnableJpaRepositories, @EnableMongoRepositories, @EnableNeo4jRepositories.

          Show
          Oliver Gierke added a comment - I've just published a first draft of the support into feature branches. The store specific implementations can be found in feature branches named after the ticket as listed above. To try out the feature refer to the library using JAVACONFIG-SNAPSHOT as version suffix (e.g. for Spring Data JPA - 1.2.0.JAVACONFIG-SNAPSHOT). The annotations are named @EnableJpaRepositories , @EnableMongoRepositories , @EnableNeo4jRepositories .
          Hide
          Oliver Gierke added a comment -

          Merged support back into master branch. Feature is now available in plain BUILD-SNAPSHOT snapshot versions of the individual store modules.

          Show
          Oliver Gierke added a comment - Merged support back into master branch. Feature is now available in plain BUILD-SNAPSHOT snapshot versions of the individual store modules.
          Hide
          Deepak Vohra added a comment -

          Is support for @EnableCassandraRepositories also available?

          Show
          Deepak Vohra added a comment - Is support for @EnableCassandraRepositories also available?
          Hide
          Deepak Vohra added a comment -

          Found @EnableCassandraRepositories is already available.

          Show
          Deepak Vohra added a comment - Found @EnableCassandraRepositories is already available.

            People

            • Assignee:
              Oliver Gierke
              Reporter:
              Brandon M.
            • Votes:
              17 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: