没有合适的资源?快使用搜索试试~ 我知道了~
spring data jpa -reference 使用指南(2014年9月版)
需积分: 10 10 下载量 51 浏览量
2015-03-22
14:37:37
上传
评论
收藏 254KB PDF 举报
温馨提示
试读
54页
spring data jpa -reference 使用指南(2014年9月版)
资源推荐
资源详情
资源评论
Spring Data JPA - Reference Documentation
, ,
Copyright ©
please define productname in your docbook file!
Spring Data JPA -
Reference Documentation ii
Table of Contents
................................................................................................................................................. iv
I. Preface ................................................................................................................................... 1
Project metadata ................................................................................................................ ii
1. Working with Spring Data Repositories ............................................................................ 3
1.1. Core concepts ..................................................................................................... 3
1.2. Query methods ................................................................................................... 4
1.3. Defining repository interfaces ............................................................................... 5
Fine-tuning repository definition ........................................................................... 5
1.4. Defining query methods ....................................................................................... 6
Query lookup strategies ...................................................................................... 6
Query creation ................................................................................................... 7
Property expressions .......................................................................................... 8
Special parameter handling ................................................................................ 8
1.5. Creating repository instances ............................................................................... 9
XML configuration .............................................................................................. 9
Using filters ................................................................................................ 9
JavaConfig ....................................................................................................... 10
Standalone usage ............................................................................................ 10
1.6. Custom implementations for Spring Data repositories ........................................... 11
Adding custom behavior to single repositories .................................................... 11
Configuration ............................................................................................ 11
Adding custom behavior to all repositories ......................................................... 12
1.7. Spring Data extensions ...................................................................................... 14
Web support .................................................................................................... 14
Basic web support .................................................................................... 15
Hypermedia support for Pageables ............................................................ 17
Repository populators ....................................................................................... 18
Legacy web support ......................................................................................... 19
Domain class web binding for Spring MVC ................................................ 19
Web pagination ........................................................................................ 21
II. Reference Documentation ..................................................................................................... 24
2. JPA Repositories .......................................................................................................... 25
2.1. Introduction ....................................................................................................... 25
Spring namespace ............................................................................................ 25
Custom namespace attributes ................................................................... 25
Annotation based configuration ......................................................................... 26
2.2. Persisting entities .............................................................................................. 27
Saving entities .................................................................................................. 27
Entity state detection strategies ................................................................. 27
2.3. Query methods .................................................................................................. 27
Query lookup strategies .................................................................................... 27
Declared queries ...................................................................................... 27
Query creation ................................................................................................. 28
Using JPA NamedQueries ................................................................................ 29
XML named query definition ..................................................................... 30
Annotation configuration ........................................................................... 30
Declaring interfaces .................................................................................. 30
please define productname in your docbook file!
Spring Data JPA -
Reference Documentation iii
Using @Query ................................................................................................. 30
Using named parameters .................................................................................. 31
Using SpEL expressions ................................................................................... 31
Modifying queries ............................................................................................. 33
Applying query hints ......................................................................................... 33
Configuring Fetch- and LoadGraphs .................................................................. 34
2.4. Stored procedures ............................................................................................. 34
2.5. Specifications .................................................................................................... 35
2.6. Transactionality ................................................................................................. 37
Transactional query methods ............................................................................ 38
2.7. Locking ............................................................................................................. 39
2.8. Auditing ............................................................................................................. 39
Basics .............................................................................................................. 39
Annotation based auditing metadata .......................................................... 39
Interface-based auditing metadata ............................................................. 40
AuditorAware ............................................................................................ 40
2.9. JPA Auditing ..................................................................................................... 41
General auditing configuration ........................................................................... 41
3. Miscellaneous .............................................................................................................. 42
3.1. Merging persistence units .................................................................................. 42
Classpath scanning for @Entity classes and JPA mapping files ........................... 42
3.2. CDI integration .................................................................................................. 42
III. Appendix ............................................................................................................................. 44
A. Namespace reference .................................................................................................. 45
A.1. The <repositories /> element .............................................................................. 45
B. Populators namespace reference .................................................................................. 46
B.1. The <populator /> element ................................................................................. 46
C. Repository query keywords .......................................................................................... 47
C.1. Supported query keywords ................................................................................ 47
D. Frequently asked questions .......................................................................................... 49
D.1. Common ........................................................................................................... 49
D.2. Infrastructure ..................................................................................................... 49
D.3. Auditing ............................................................................................................ 49
E. Glossary ...................................................................................................................... 50
please define productname in your docbook file!
Spring Data JPA -
Reference Documentation iv
© 2008-2014 The original authors.
Note
Copies of this document may be made for your own use and for distribution to others, provided
that you do not charge any fee for such copies and further provided that each copy contains this
Copyright Notice, whether distributed in print or electronically.
Part I. Preface
剩余53页未读,继续阅读
资源评论
ziiancs
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功