Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java-based Configuration of Repositories [DATACMNS-47] #529

Closed
spring-projects-issues opened this issue Jun 16, 2011 · 8 comments
Closed
Assignees
Labels
has: votes-jira in: repository Repositories abstraction type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link

Brandon M. opened DATACMNS-47 and commented

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


Affects: 1.0 Final

Reference URL: http://forum.springsource.org/showthreadQuery.php?108508-Java-Config-Support-for-Repository-Configuration&p=359537

Issue Links:

  • DATACMNS-103 Setup hybrid Spring 3.0.6 / 3.1 build
    ("depends on")
  • DATAGRAPH-266 Provide JavaConfig support
    ("is depended on by")
  • DATAJPA-69 Repositories scanning using java-config
    ("is depended on by")
  • DATAMONGO-476 JavaConfig support for Mongo repositories
    ("is depended on by")
  • SGF-102 Add support for JavaConfig for repositories
    ("is depended on by")

Referenced from: commits 27a8a8d, 96795f2

17 votes, 24 watchers

@spring-projects-issues
Copy link
Author

Brandon M. commented

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

@spring-projects-issues
Copy link
Author

Michael Andrews commented

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

@spring-projects-issues
Copy link
Author

Michael Andrews commented

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

@spring-projects-issues
Copy link
Author

Oliver Drotbohm commented

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

@spring-projects-issues
Copy link
Author

Oliver Drotbohm commented

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

@spring-projects-issues
Copy link
Author

Oliver Drotbohm commented

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

@spring-projects-issues
Copy link
Author

Deepak Vohra commented

Is support for @EnableCassandraRepositories also available?

@spring-projects-issues
Copy link
Author

Deepak Vohra commented

Found @EnableCassandraRepositories is already available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: votes-jira in: repository Repositories abstraction type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants