https://github.com/starichkov/quarkus-micro-service
Quarkus framework based example of the micro-service with HTTP endpoints (often called as REST) and multiple additional features.
https://github.com/starichkov/quarkus-micro-service
docker docker-compose java microservices quarkus quarkusio redis
Last synced: 8 months ago
JSON representation
Quarkus framework based example of the micro-service with HTTP endpoints (often called as REST) and multiple additional features.
- Host: GitHub
- URL: https://github.com/starichkov/quarkus-micro-service
- Owner: starichkov
- License: mit
- Created: 2021-08-03T08:38:04.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-22T11:49:53.000Z (8 months ago)
- Last Synced: 2025-02-22T12:28:26.972Z (8 months ago)
- Topics: docker, docker-compose, java, microservices, quarkus, quarkusio, redis
- Language: Java
- Homepage:
- Size: 252 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://github.com/starichkov/quarkus-micro-service/actions/workflows/maven.yml)
[](https://codecov.io/gh/starichkov/quarkus-micro-service)
[](https://github.com/starichkov/quarkus-micro-service/blob/main/LICENSE.md)Quarkus microservice
=
This project is a Quarkus framework based, 'ready-to-play' micro-service.| Name | Version |
|------------|---------|
| Java | 21 |
| Maven | 3.8.1+ |
| Quarkus | 3.18.4 |
| PostgreSQL | 17.2 |## What's inside?
### Quarkus extensions-based features
- REST controller with multiple endpoints ([official guide](https://quarkus.io/guides/rest-json))
- JSON serialisation using Jackson
- YAML-based configuration ([official guide](https://quarkus.io/guides/config-yaml))
- Database with Flyway migration support ([official guide](https://quarkus.io/guides/flyway))
- H2 database for test scope
- Health check endpoints ([official guide](https://quarkus.io/guides/smallrye-health))
- Scheduled tasks configured to use Unix [Crontab](https://crontab.guru/) syntax ([official guide](https://quarkus.io/guides/scheduler-reference))
- Redis client with health indicator ([official guide](https://quarkus.io/guides/redis))
- OpenTelemetry support ([official guide](https://quarkus.io/guides/opentelemetry))
- EventBus (alternative to Spring's ApplicationEvent system, [official guide](https://quarkus.io/guides/reactive-event-bus))
- Qute templating engine (special-for-Quarkus alternative to Freemarker or Mustache engines, [official guide](https://quarkus.io/guides/qute-reference))This service contains multiple features which requires some specific servers to be available and resolvable:
| Feature | Requirement | How to run in Docker | How to disable |
|---------------|---------------|--------------------------------------------|------------------------------------|
| Database | PostgreSQL | [postgres.md](/documentation/postgres.md) | - required - |
| Redis | Redis server | [redis.md](/documentation/redis.md) | |
| OpenTelemetry | Jaeger server | [jaeger.md](/documentation/jaeger.md) | |
| Metrics | Prometheus | [metrics.md](/documentation/prometheus.md) | `quarkus.micrometer.enabled=false` |#### Health check
These endpoints are available via following URLs:
```
GET http://localhost:8080/q/health
GET http://localhost:8080/q/health/live
GET http://localhost:8080/q/health/ready
```Also, there is Health UI provided too:
```
http://localhost:8080/q/health-ui/
```### Docker
This service contains two Dockerfile-s, [more details](/documentation/docker.md) on the separate page.
### 3rd party libraries features
- Lombok + Mapstruct (with Mapstruct's CDI mode)
## What's the plan?
List of features I am planning to add:
- Async controller endpoints
- Hibernate ORM with Panache ([official guide](https://quarkus.io/guides/hibernate-orm-panache))
- WebSocket support
- AMPQ support
- Migrate to multi-module Maven project
- Native Build with GraalVM## Limitations found
Quarkus does not support/provide:
- Redis as a persistence layer for caching extension. It means you can't use Quarkus `@Cache**` annotations with underlying Redis.
And Quarkus itself will not allow to implement such layer easily - caching extension does not accept custom `CacheManager` or cache types.- AOP (AspectJ) as Spring does. Partially similar behavior could be achieved via Interceptors, but it is still quite a different thing...
## License
See the [LICENSE](LICENSE.md) file for license rights and limitations (MIT).