Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update quarkus version to 2.16.10.Final and add RESTeasy resource #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions functions-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>2.13.0.Final</quarkus-plugin.version>
<quarkus-plugin.version>2.16.10.Final</quarkus-plugin.version>
<quarkus.package.type>uber-jar</quarkus.package.type>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>2.13.0.Final</quarkus.platform.version>
<quarkus.platform.version>2.16.10.Final</quarkus.platform.version>
<resources-plugin.version>3.1.0</resources-plugin.version>
<stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory>
<surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
<surefire-plugin.version>3.1.2</surefire-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
Expand All @@ -43,6 +43,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-funqy-http</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-azure-functions-http</artifactId>
Expand Down
17 changes: 17 additions & 0 deletions functions-quarkus/src/main/java/io/quarkus/GreetingResource.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.quarkus;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {

@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return "hello RESTEasy";
}

}
8 changes: 8 additions & 0 deletions functions-quarkus/src/test/java/io/quarkus/GreetingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ public void testFunqy() {
.contentType("application/json")
.body(equalTo("\"hello funqy\""));
}

@Test
public void testRESTEasy() {
RestAssured.when().get("/hello").then()
.statusCode(200)
.contentType("application/json")
.body(equalTo("\"hello RESTEasy\""));
}
}