简体   繁体   中英

how create a custom Auto-Configuration in parent maven project with quarkus

Request description:
I want integration a few propertie (such as: quarkus.log.console.format、quarkus.smallrye-metrics.path) in parent maven project, new project just extend parent maven project can be auto-config that propertie and make sure all project get same propertie.

Simple relation:
Auto-Configuration parent project (has propertie: quarkus.smallrye-metrics.path=/myMetrics)
|———— A child Proejct (non-propertie)
|———— B child Proejct (non-propertie)

use http://${A project domain}/myMetrics and http://${B project domain}/myMetrics can get metrics.

Tried:

  1. add quarkus.smallrye-metrics.path=/myMetrics in parent project/application.properties
  2. read source code , but I can't find any way make it.

env infomation:

  1. java version: 1.8
  2. quarkus version: 1.5.2

This is already supported in Quarkus since 1.13: https://github.com/quarkusio/quarkus/pull/15282

If you can't upgrade, you can use microprofile-config.properties instead which behaves the same way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM