forked from quarkus-qe/quarkus-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is cover age for quarkusio/quarkus#43440 (cherry picked from commit 2ebfe00)
- Loading branch information
Showing
4 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...vanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
|
||
public interface GreetingInterface { | ||
|
||
@GET | ||
@Path("/interface-greeting") | ||
String interfaceGreeting(); | ||
} |
20 changes: 20 additions & 0 deletions
20
...ive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingOptionAndHeadResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.enterprise.inject.spi.CDI; | ||
import jakarta.ws.rs.Path; | ||
|
||
@Path("/greeting") | ||
public class GreetingOptionAndHeadResource implements GreetingInterface { | ||
|
||
@Path("/cdi-sub-resource") | ||
public GreetingSubResources helloFromSubResource() { | ||
return CDI.current() | ||
.select(GreetingSubResources.class) | ||
.get(); | ||
} | ||
|
||
@Override | ||
public String interfaceGreeting() { | ||
return "Greeting from interface"; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/GreetingSubResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.ts.http.advanced.reactive; | ||
|
||
import jakarta.enterprise.context.RequestScoped; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.POST; | ||
|
||
@RequestScoped | ||
public class GreetingSubResources { | ||
|
||
@GET | ||
public String get() { | ||
return "Greeting from sub-resource using GET"; | ||
} | ||
|
||
@POST | ||
public String post() { | ||
return "Greeting from sub-resource using POST"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters