Closed kopax closed 7 years ago
Hi @kopax, MyBatisRepository extends Repository , not PagingAndSortingRepository. All the errors you've got derive from this.
@jclagache I have found this plugin : https://github.com/hatunet/spring-data-mybatis
It take care of all sort of repository and is hateoas compatible. I've just tested the 1.0.2 and it work very fine.
https://github.com/hatunet/spring-data-mybatis looks brillant ! Nice to see that you finally found what you were strongly looking for.
Thanks for updating the plugin on the latest version.
I am trying to make spring-data-rest, spring-hateoas to work with my mybatis.
It work fine with the example you provide, if I try to implement it using spring-data-rest, the plugin has some unwanted behavior for example:
I have a ManagerRepository.java :
I create this test controller to confirm it work:
and it work!:
Now I activate spring-data-rest by setting a base-path for my API, if I add the following to my
application.yml
:I'm expecting repositories to be exposed, I can verify it using curl :
Great so far, but if I try to curl the managers link :
Same probleme with the managers profile : http://localhost:8090/api/profile/managers
Is this a bug or me using it wrong ?
Also, the
ClassPathMapperScanner
now wait for a very long scan twice before allowing me to start my application. Is it because we do not use the @Repository inspring-data-mybatis
?It is not very clear what's inside, are theses supposed to work ?
Does your plugin cover or will cover the same scope of usage as hatunet's plugin ?
https://github.com/hatunet/spring-data-mybatis (Doc : http://www.ifrabbit.com/)
Thanks!
Edit:
I forgot, this is my ManagerMapper.xml