Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
Merge pull request #78 from paypal/develop
Browse files Browse the repository at this point in the history
Bringing in 2.3.3 changes to master
  • Loading branch information
fabiocarvalho777 authored Aug 1, 2017
2 parents 91127a5 + 61bd84f commit 21aafad
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the Maven dependency below to your Spring Boot application pom file.<br>
<dependency>
<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<scope>runtime</scope>
</dependency>
```
Expand Down
16 changes: 16 additions & 0 deletions mds/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Release notes

## 2.3.3-RELEASE

#### Release date
August 1st, 2017.

#### Third-party versions
- RESTEasy: 3.1.4.Final
- Spring Boot: 1.5.6.RELEASE

#### New features and enhancements
1. [76 - Upgrade to Spring Boot version 1.5.6](https://github.com/paypal/resteasy-spring-boot/issues/76)
1. [77 - Upgrade to RESTEasy version 3.1.4.Final](https://github.com/paypal/resteasy-spring-boot/issues/77)

#### Bug fixes
None

## 2.3.2-RELEASE

#### Release date
Expand Down
2 changes: 1 addition & 1 deletion mds/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Add the Maven dependency below to your Spring Boot application pom file.<br>
<dependency>
<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<scope>runtime</scope>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter-parent</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion resteasy-spring-boot-starter-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter-test</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<name>${project.artifactId}</name>

<description>Integration test project for RESTEasy Spring Boot starter</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void asyncRequestTest() {
response.then().statusCode(202).body(isEmptyString());

String location = response.getHeader("Location");
response = given().get(location + "?wait=50");
response = given().get(location + "?wait=1000");
response.then().statusCode(200).body("timestamp", notNullValue()).body("echoText", equalTo("is there anybody out there?"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ public void invalidBaseUrlTest() {
response.then().statusCode(404).body("status", equalTo(404)).body("error", equalTo("Not Found"));
}

@Test
public void invalidNoPayloadTest() {
// Notice that the endpoint we are sending a request to uses Bean Validations to assure
// the request message payload is valid. If that is not the case (a blank payload for example),
// then the server is expected to return a 400 response message
Response response = given().body("").post("/echo");
response.then().statusCode(400).body(equalTo("[PARAMETER]\r[echo.arg0]\r[may not be empty]\r[]\r\r"));
}

@Test
public void actuatorTest() throws InterruptedException {
Response response = given().basePath("/").get("/health");
Expand Down
9 changes: 6 additions & 3 deletions resteasy-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.paypal.springboot</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<name>${project.artifactId}</name>

<description>A Spring Boot starter for RESTEasy</description>
Expand Down Expand Up @@ -44,8 +44,8 @@
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<springboot.version>1.5.3.RELEASE</springboot.version>
<resteasy.version>3.1.3.Final</resteasy.version>
<springboot.version>1.5.6.RELEASE</springboot.version>
<resteasy.version>3.1.4.Final</resteasy.version>
<coverage.line>80</coverage.line>
<coverage.branch>80</coverage.branch>
</properties>
Expand Down Expand Up @@ -92,6 +92,9 @@
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>


<!-- Test dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand Down
12 changes: 10 additions & 2 deletions sample-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@

<groupId>com.test</groupId>
<artifactId>sample-app</artifactId>
<version>2.3.2-RELEASE</version>
<version>2.3.3-RELEASE</version>
<packaging>jar</packaging>

<description>Simple test application for the Resteasy Spring Boot starter</description>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<version>1.5.6.RELEASE</version>
<relativePath/>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<resteasy.version>3.1.4.Final</resteasy.version>
</properties>

<dependencies>
Expand All @@ -43,6 +44,13 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>

<!-- Adding RESTEasy support to Bean Validations -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-validator-provider-11</artifactId>
<version>${resteasy.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
4 changes: 3 additions & 1 deletion sample-app/src/main/java/com/sample/app/Echo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.hibernate.validator.constraints.NotEmpty;

/**
* Echo REST endpoint class
*
Expand All @@ -33,7 +35,7 @@ public class Echo {
@POST
@Consumes({ MediaType.TEXT_PLAIN })
@Produces({ MediaType.APPLICATION_JSON })
public EchoMessage echo(String echoText) {
public EchoMessage echo(@NotEmpty String echoText) {
return echoer.createEchoMessage(echoText);
}

Expand Down

0 comments on commit 21aafad

Please sign in to comment.