Im trying to upgrade my project from spring-boot-1.4.3.RELEASE to spring-boot-1.5.9.RELEASE.
In the 1.4.3.RELEASE the way I have used my custom implementation of repositories is as follow:
- Made an interface
MyCustomRepositroythat extendsJpaRepository - Had a class
MyCustomRepositoryImplthat implementsMyCustomRepositroyandSimpleJpaRepository. In that class I have changed the behavior of
the ofsave,findanddeletemethods, because I needed a
ceratin behavior for entitys of certain type (lets say that I need a customsavefor all entitys that implementsSpecialinterface) - I made a
MyCustomJpaRepositoryFactoryBeanthat extendsJpaRepositoryFactoryBean. In that factory, I've overriddencreateRepositoryFactoryand gave it myMyRepositoryFactoryimplementation. InMyRepositoryFactoryimplementation I've overridden thegetTargetRepository, andgetRepositoryBaseClass.In these methods, I check if the entity is of typeSpecial, and if so, I returnMyCustomRepositoryImpl, otherwise I returnSimpleJpaRepository.
Also, I can get the beanFactory in my MyCustomRepositoryImpl class because I call my own constructor of MyCustomRepositoryImpl that has also a beanFactory parameter via getTargetRepositoryViaReflection.
Now, with the new version (that uses spring-data-commons-1.13.9.RELEASE), I cannot override the Factory class, and hence can't decide for each entitiy which implementation to give, and have no way to get the beanFactory.
Is there any way I can get what I want?
Sorry for the mess, but I cannot post my code here.
P.S - my project is a spring based library, so I can't do anything to the entitys because my clients declare them, all I know that some entitys implement the Special interface and some don't
I am trying to figure out what happened in 1.5.9.RELEASE, but in the meantime, just as a fyi - 1.5.6.RELEASE works ok.
I am having the same issue when trying to update from 1.5.6.RELEASE to 1.5.9.RELEASE