
spring data jpa
迷彩_风情
代码改变世界
展开
-
Spring Data JPA repositories using JavaConfig
@Configuration@EnableJpaRepositories@EnableTransactionManagementclass ApplicationConfig { @Bean public DataSource dataSource() { EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuil原创 2017-06-16 14:03:51 · 1291 阅读 · 0 评论 -
Spring data jpa Supported keywords inside method names
spring data jpa中named query中关键字与方法名以及jpql语句一一对应,总结出来,以便用到的时候查阅。更多spring data jpa请参考:http://docs.spring.io/spring-data/jpa/docs/1.6.4.RELEASE/reference/html/jpa.repositories.html原创 2017-06-16 15:07:21 · 372 阅读 · 0 评论 -
JPA 开发中遇到的错误
spring data jpa:Spring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA based repositories. This module deals with enhanced support for JPA based data access layers. It makes it easier to build Spring-powered applicati转载 2017-06-14 15:33:41 · 1183 阅读 · 0 评论 -
JPA-style positional param was not an integral ordinal错误解决办法
在用jpa nativequery语句中,用spring junit测试发现报错:JPA-style positional param was not an integral ordinal。。。。。。经过百度与自己代码调试发现:多是sql之间的空格问题,或者sql拼接问题,还有可能是sql语句后面不能有分号。原创 2017-10-09 14:17:06 · 20153 阅读 · 0 评论 -
@Query注解的用法(Spring Data JPA)
参考文章:http://www.tuicool.com/articles/jQJBNv 1. 一个使用@Query注解的简单例子@Query(value = "select name,author,price from Book b where b.price>?1 and b.price)List findByPriceRange(long price1, long p转载 2017-10-09 14:19:28 · 2490 阅读 · 1 评论