I am trying to use Spring Data JPA with MyBatis. Since there isnt a Vendor Adapter for MyBatis, what is the alternative here?
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="com.abc.xyz.domain"/>
</bean>
I am getting the below exception when I tried to initialize my application.
Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No PersistenceProvider specified in EntityManagerFactory configuration, and chosen PersistenceUnitInfo does not specify a provider class name either
Thanks
Why not try spring-data-jpa-extra
It provide a dynamic query solution for spring-data-jpa like mybatis, but much easier than mybatis.
I think you would like it : )
Spring Data MyBatis
If you would not like to use a JPA implementation like Spring-Data-JPA module, but you like use Spring-Data you can find Spring-Data-Mybatis a useful project.
I know that this is not precise answer to your question but I hope that this answer can be interesting.
Spring-Data-Mybatis Hatunet version
I am using this project: https://github.com/hatunet/spring-data-mybatis
It fit very well with spring-data-mybatis and it have also the paginated repository.
Work very well on production project.
来源:https://stackoverflow.com/questions/33652936/spring-data-jpa-mybatis