Clean Architecture: Implementation Using Quarkus + Gradle Multi-Project. Part 5

Luis Illera • August 16, 2023

Welcome back to our journey through Gradle Multi-Project Clean Architecture with Quarkus and Java 17.

 In this chapter, we'll dive into the configuration of the infrastructure/properties module. This module plays a vital role in centralizing and managing configuration properties for our application, streamlining the process of mapping properties to Java classes.

Configuring Properties Module: Simplifying Configuration


The infrastructure-properties module acts as a dedicated repository for managing configuration properties across the application. By abstracting away the complexities of handling configuration files and properties, this module promotes a clean and organized approach to configuration management.

No Dependencies, Just Streamlined Configuration

One notable aspect of the infrastructure/properties module is that it doesn't have any external dependencies. Its primary focus is on simplifying the configuration process without introducing unnecessary complexity or additional libraries.

Dependency Setup

Here's how you can utilize the infrastructure/properties module to streamline configuration mapping:

  1. Navigate to the clean-architecture-project/infrastructure/properties directory.
  2. Open the build.gradle file and ensure that there are no additional dependencies beyond the standard Java and Gradle plugins.
  3. Create Java classes that mirror the structure of your configuration properties.
  4. Use annotations provided by Quarkus to map properties from your configuration files to these Java classes.
Streamlined Configuration, Clean Code

By centralizing the configuration management and leveraging annotations for mapping properties, the infrastructure/properties module contributes to a more organized and maintainable codebase. It abstracts away the intricacies of configuration files, allowing developers to focus on the essential aspects of the application.

For detailed guidance on mapping properties to objects with Quarkus, refer to the Mapping Configuration to Objects Guide.

Conclusion

In this segment, we've delved into the configuration of the infrastructure/properties module, highlighting its significance in simplifying configuration management. This module's streamlined approach to properties mapping helps maintain clean code and promotes efficient configuration handling.

As we continue our exploration of Clean Architecture, we'll dive into more facets of the infrastructure layer, uncovering the tools and strategies that contribute to the architectural integrity of our application.


You can find the code of this section in the branch: steps/6-configuring-infrastructure-properties.

By Luis Illera August 15, 2023
Welcome to the fourth installment of our journey into Clean Architecture with Quarkus and Java 17.
By Luis Illera August 15, 2023
Welcome back to the third installment of our blog post series on Clean Architecture with Quarkus and Java 17. In this chapter, we're diving deep into the heart of our system by configuring the business module group. This pivotal group houses essential interfaces that define the interactions between our application's core logic, external services, and data repositories.
By Luis Illera August 15, 2023
As we venture deeper into our Gradle Multi-Project Clean Architecture journey with Quarkus and Java 17, we find ourselves at a pivotal juncture where our architectural components meet practical implementation. In the last few segments of our blog series, we've been focusing on fine-tuning the entrypoint layer, which serves as the gateway for external interactions with our application.