Skip to content

Commit 2c1c281

Browse files
committed
2.1.5.1.RELEASE
1 parent 0279663 commit 2c1c281

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

README.adoc

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
<dependency>
1212
<groupId>io.github.u2ware</groupId>
1313
<artifactId>spring-data-rest-jpa-specification</artifactId>
14-
<version>2.1.4.1.RELEASE</version>
14+
<version>2.1.5.1.RELEASE</version>
1515
</dependency>
1616
----
1717

1818
*spring-data-rest-specification* 는
19-
https://docs.spring.io/spring-boot/docs/2.1.4.RELEASE/reference/htmlsingle/[spring-boot-2.1.4.RELEASE] ,
19+
https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/reference/htmlsingle/[spring-boot-2.1.5.RELEASE] ,
2020
기반으로 동작합니다.
2121

2222

2323
== PredicateBuilder
2424

25-
*spring-data-rest-specification* 는 link:https://docs.spring.io/spring-data/jpa/docs/2.1.6.RELEASE/api/org/springframework/data/jpa/domain/Specification.html[Specification] 를 작성하기 위해
25+
*spring-data-rest-specification* 는 link:https://docs.spring.io/spring-data/jpa/docs/2.1.8.RELEASE/api/org/springframework/data/jpa/domain/Specification.html[Specification] 를 작성하기 위해
2626
link:./src/main/java/org/springframework/data/jpa/repository/query/PredicateBuilder.java[PredicateBuilder]
2727
를 제공합니다.
2828

@@ -57,7 +57,7 @@ public class PeopleQuery implements Specification<People>{
5757

5858
== JpaSpecification
5959

60-
*spring-data-rest-specification* 는 link:https://docs.spring.io/spring-data/jpa/docs/2.1.6.RELEASE/api/org/springframework/data/jpa/domain/Specification.html[Specification] 를 생성하기 위해
60+
*spring-data-rest-specification* 는 link:https://docs.spring.io/spring-data/jpa/docs/2.1.8.RELEASE/api/org/springframework/data/jpa/domain/Specification.html[Specification] 를 생성하기 위해
6161
link:./src/main/java/org/springframework/data/jpa/repository/query/JpaSpecification.java[JpaSpecification]
6262
를 제공합니다.
6363

@@ -79,7 +79,7 @@ public class PeopleService{
7979

8080
== The dynamic query method resource
8181

82-
https://docs.spring.io/spring-data/rest/docs/3.1.6.RELEASE/reference/html/#repository-resources.query-method-resource[spring-data-rest] 는
82+
https://docs.spring.io/spring-data/rest/docs/3.1.8.RELEASE/reference/html/#repository-resources.query-method-resource[spring-data-rest] 는
8383
아래와 같이 정의된 https://docs.spring.io/spring-data/jpa/docs/2.1.6.RELEASE/reference/html/#repositories.query-methods.query-creation[Query Method] 에 대해
8484
_/people/search/findByNameStartsWith_ 주소로 Resource 를 제공하는것으로 알려져 있습니다.
8585
[source,java,indent=1]
@@ -197,6 +197,33 @@ public class MyPeopleHandler extends RepositoryRestEventHandler<People>{ //**
197197
...
198198
199199
}
200+
<<<<<<< HEAD
201+
202+
@Override
203+
public void handleAfterCreate(People entity) {
204+
... logic to handle inspecting the entity before the Repository saves it
205+
}
206+
207+
@Override
208+
public void handleAfterDelete(People entity) {
209+
... send a message that this entity has been delete
210+
}
211+
}
212+
----
213+
214+
다음과 같이
215+
link:./src/main/java/org/springframework/data/rest/core/annotation/HandleBeforeRead.java[@HandleBeforeRead]
216+
을 사용하는 방법도 있습니다.
217+
218+
[source,java,indent=1]
219+
----
220+
// --> /peoples/!q
221+
@Component
222+
@RepositoryEventHandler(People.class) //**
223+
public class MyPeopleHandler {
224+
225+
@HandleBeforeRead //**
226+
=======
200227
}
201228
----
202229

@@ -221,15 +248,6 @@ public class MyPeopleHandler {
221248
...
222249
}
223250
224-
@HandleAfterCreate
225-
public void handleAfterCreate(People entity) {
226-
... logic to handle inspecting the entity before the Repository saves it
227-
}
228-
229-
@HandleAfterDelete
230-
public void handleAfterDelete(People entity) {
231-
... send a message that this entity has been delete
232-
}
233251
}
234252
----
235253

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
</parent>
1919

2020
<properties>
21+
<!-- https://github.com/spring-projects/spring-boot/issues/16846#issuecomment-492792506-->
22+
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
2123
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2224
<java.version>1.8</java.version>
2325
<github.global.server>github</github.global.server>

0 commit comments

Comments
 (0)