Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daggerok/quarkus-reactive-pg

Quarkus MicroProfile reactive postgres data access and REST API
https://github.com/daggerok/quarkus-reactive-pg

micro-profile microprof microprofile microprofile-config microprofile-demo microprofile-example microprofile-examples microprofile-health mp quarkus

Last synced: about 2 months ago
JSON representation

Quarkus MicroProfile reactive postgres data access and REST API

Awesome Lists containing this project

README

        

# quarkus-reactive-pg [![Build Status](https://travis-ci.org/daggerok/quarkus-reactive-pg.svg?branch=master)](https://travis-ci.org/daggerok/quarkus-reactive-pg)
Quarkus micro-profile starter using Gradle / Maven build tools.

_getting started_

```bash
./mvnw -Pdocker docker:start

#./mvnw process-resources flyway:migrate
./mvnw compile quarkus:dev

./mvnw -Pdocker docker:stop
```

## MicroProfile static typed RestClient

_add rest-client extension_

```bash
./mvnw quarkus:add-extensions -Dextensions="quarkus-smallrye-rest-client"
```

_or directly in pom.xml_

```xml


io.quarkus
quarkus-smallrye-rest-client

```

_declare proxy interface: HelloRestClient.java_

```java
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

@Path("/")
@RegisterRestClient
public interface HelloRestClient {

@GET
@Produces(APPLICATION_JSON)
String getHello();
}
```

_usage_

```java
@Inject
@RestClient
HelloRestClient restClient;
// ...
var greeting = restClient.getHello();
```

## resources

* [YouTube: Build Eclipse MicroProfile apps quickly with Quarkus | Jakarta TechTalks](https://www.youtube.com/watch?v=hReKM6rmcho)

_NOTE: This project has been based on [GitHub: daggerok/main-starter](https://github.com/daggerok/main-starter)_