A Quarkus MicroProfile application:
@Path("hello")
@ApplicationScoped
public class GreetingResource {
@Inject
Greeter greeter;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return this.greeter.greetings();
}
@POST
@Consumes(MediaType.TEXT_PLAIN)
public void hello(String message) {
this.greeter.greetings(message);
}
}
...with an additional dependency / extension for AWS REST APIs Gateway:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-amazon-lambda-rest</artifactId>
</dependency>