Created
February 3, 2018 11:06
-
-
Save mmaravich/b430daf319c79aa7fb82d60a5b53b239 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo; | |
import java.io.Serializable; | |
import org.springframework.data.mongodb.core.MongoOperations; | |
import org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean; | |
import org.springframework.data.repository.Repository; | |
import org.springframework.data.repository.core.support.RepositoryFactorySupport; | |
import org.springframework.data.repository.query.QueryLookupStrategy.Key; | |
public class InheritanceAwareMongoRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends | |
MongoRepositoryFactoryBean<T, S, ID> { | |
public InheritanceAwareMongoRepositoryFactoryBean(Class<? extends T> repositoryInterface) { | |
super(repositoryInterface); | |
} | |
@Override | |
protected RepositoryFactorySupport getFactoryInstance(MongoOperations operations) { | |
return new InheritanceAwareMongoRepositoryFactory(operations); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment