Skip to content

Commit

Permalink
upgraded to commons-rest 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
melistik committed Apr 23, 2019
1 parent bd488a3 commit d5f4647
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import io.rocketbase.commons.dto.appuser.AppUserCreate;
import io.rocketbase.commons.dto.appuser.AppUserRead;
import io.rocketbase.commons.dto.appuser.AppUserUpdate;
import io.rocketbase.commons.request.PageableRequest;
import lombok.SneakyThrows;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
Expand All @@ -34,7 +35,7 @@ public AppUserResource(JwtRestTemplate restTemplate) {
@SneakyThrows
public PageableResult<AppUserRead> find(int page, int pagesize) {
ResponseEntity<PageableResult<AppUserRead>> response = restTemplate.exchange(appendParams(createUriComponentsBuilder(baseAuthApiUrl),
new PageableRequest(page, pagesize, null))
PageRequest.of(page, pagesize))
.path(API_USER)
.toUriString(),
HttpMethod.GET,
Expand All @@ -44,8 +45,8 @@ public PageableResult<AppUserRead> find(int page, int pagesize) {
}

@SneakyThrows
public PageableResult<AppUserRead> find(PageableRequest request) {
ResponseEntity<PageableResult<AppUserRead>> response = restTemplate.exchange(appendParams(createUriComponentsBuilder(baseAuthApiUrl), request)
public PageableResult<AppUserRead> find(Pageable pageable) {
ResponseEntity<PageableResult<AppUserRead>> response = restTemplate.exchange(appendParams(createUriComponentsBuilder(baseAuthApiUrl), pageable)
.path(API_USER)
.toUriString(),
HttpMethod.GET,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SOFTWARE.
<maven.compiler.target>1.8</maven.compiler.target>
<spring-boot.version>2.1.4.RELEASE</spring-boot.version>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<commons-rest.version>1.4.1</commons-rest.version>
<commons-rest.version>1.4.2</commons-rest.version>
<jjwt.version>0.10.6</jjwt.version>
<guava.version>27.1-jre</guava.version>
<passay.version>1.0</passay.version>
Expand Down

0 comments on commit d5f4647

Please sign in to comment.