| 关键字 | 方法命名 | sql where字句 |
| And | findByNameAndPwd | where name= ? and pwd =? |
| Or | findByNameOrSex | where name= ? or sex=? |
| Is,Equals | findById,findByIdEquals | where id= ? |
| Between | findByIdBetween | where id between ? and ? |
| LessThan | findByIdLessThan | where id < ? |
| LessThanEqual | findByIdLessThanEqual | where id <= ? |
| GreaterThan | findByIdGreaterThan | where id > ? |
| GreaterThanEqual | findByIdGreaterThanEqual | where id > = ? |
| After | findByIdAfter | where id > ? |
| Before | findByIdBefore | where id < ? |
| IsNull | findByNameIsNull | where name is null |
| isNotNull,NotNull | findByNameNotNull | where name is not null |
| Like | findByNameLike | where name like ? |
| NotLike | findByNameNotLike | where name not like ? |
StartingWith |
findByNameStartingWith | where name like '?%' |
| EndingWith | findByNameEndingWith | where name like '%?' |
| Containing | findByNameContaining | where name like '%?%' |
| OrderBy | findByIdOrderByXDesc | where id=? order by x desc |
| Not | findByNameNot | where name <> ? |
| In | findByIdIn(Collection<?> c) | where id in (?) |
| NotIn | findByIdNotIn(Collection<?> c) | where id not in (?) |
| True | findByAaaTue |
where aaa = true |
| False | findByAaaFalse | where aaa = false |
| IgnoreCase | findByNameIgnoreCase | where UPPER(name)=UPPER(?) |
详细解决方案
spring data jpa方法命名规则
热度:43 发布时间:2024-02-05 02:03:46.0
相关解决方案
- Spring MVC开发模式,怎么取得新增的id
- spring 表单对象绑定有关问题 String与Long的转换
- spring+quartz定时器有关问题
- spring @Scope("prototype")注解更新有关问题,寻求帮助
- Spring MVC是不是可以完全取代Struts
- Spring 中 packagesToScan有关问题
- Spring MVC中点击旋钮没反应
- spring 事务 aop transactionManager,该怎么解决
- 求SSM分页 struts +spring+mybatis 给小弟我发个学习学习吧 多谢大神们
- spring placeholderConfig的有关问题
- spring 事宜 aop transactionManager
- Spring 和 hibernate如何配置事物
- hibernate与此同时使用多数据源?spring+hibernate
- Spring 动态代理,该怎么解决
- java spring mvc,该怎么解决
- spring mvc 接收对象数组解决办法
- Spring Data 的有关问题
- spring mvc3 使用jackson返回json时候无限循环
- struts+spring+hibernate 开发,在action层调用service层接口,结果替null 注入失败,需高手帮忙
- 生手求教,dwr+struts+spring 页面跳提示框error
- spring IOC 原理解决方法
- uploadify3.1下传 spring+struts2+hibernate框架中取值的有关问题
- spring 事务配置不回滚的有关问题。
- spring mvc施用得广泛么
- Spring Quartz定时任务怎么获得ServletContext对象
- Spring MVC中的SimpleControllerHandlerAdapters是作什么用的?该怎么解决
- Spring 的小疑点
- Spring AOP , aspect使用时的思路解决思路
- Spring service调用有关问题
- 哪位高手能推荐下开源的购物网站源码(struts+hibernate+spring)