Skip to content

SmallRye Config#

SmallRye Config is a library that provides a way to configure applications, frameworks and containers. It is used in applications servers like WildFly and Open Liberty, or frameworks like Quarkus. It can also be used completely standalone in any Java application, which makes it a very flexible library.

It follows the MicroProfile Config specification to provide the initial config foundations and expands with it own concepts to cover a wide range of use cases observed in the configuration space.

Use SmallRye Config in a Java application#

Add the dependency to your project using your preferred build tool:

<dependency>
    <groupId>io.smallrye.config</groupId>
    <artifactId>smallrye-config</artifactId>
    <version>2.11.1</version>
</dependency>
implementation 'io.smallrye.config:smallrye-config:{{ no such element: dict object['versions'] }}'
implementation("io.smallrye.config:smallrye-config:{{ no such element: dict object['versions'] }}")
//DEPS io.smallrye.config:smallrye-config:{{ no such element: dict object['versions'] }}

And retrieve a SmallRyeConfig instance with:

SmallRyeConfig config = ConfigProvider.getConfig().unwrap(SmallRyeConfig.class);

Info

SmallRyeConfig is the entry point to all the config capabilities provided by SmallRye Config.