How to build and deploy Microprofile applications on Wildfly

WildFly provides support with the latest version of Microprofile API. This means you can combine the Jakarta EE API which is included in WildFly modules with the MicroProfile API to provide advanced Enterprise application. Let’s check in this tutorial how to build applications which use the Microprofile API.

Microprofile wildfly tutorial Microprofile wildfly tutorial

The recommended way to build and deploy MicroProfile applications on WildFly is to include the following BOM dependency:

<dependency>
    <groupId>org.wildfly.bom</groupId>
    <artifactId>wildfly-microprofile</artifactId>
    <version>${wildfly.version}</version>
    <scope>import</scope>
    <type>pom</type>
</dependency>

This will keep in sync the version of all your Microprofile dependencies:

<dependency>
   <groupId>org.eclipse.microprofile.config</groupId>
   <artifactId>microprofile-config-api</artifactId>
</dependency>

On the other hand, if you prefer to sync your Microprofile dependencies against a specific Microprofile specification rather than to the version included in WildFly, then you can use the following BOM in your dependencies:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.eclipse.microprofile</groupId>
            <artifactId>microprofile</artifactId>
            <version>3.3</version>
            <scope>import</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
</dependencyManagement>

If you want to check some examples of Microprofile applications running on WildFly, we recommend checking the following tutorials: https://www.mastertheboss.com/category/eclipse/eclipse-microservices/

Found the article helpful? if so please follow us on Socials