Skip to content

yoga1290/microkernel-core-system

Repository files navigation

Whats this?

Spring module to be used as dependency that pre-configures and initializes commonly used. This would same boilerplate configuration as well as unify the logging mechanisim, making it easiser for log monitoring tools.

docs/readme.png

Pre-configured features:

  • API and Service Logging
    • uses AOP to configure MDC context traceable map and produce logs across pointcuts for @Controller and @Service
  • Thread Pool
    • Configure thread pool for @Async processes using the provided properties, otherwise falls back to pre-configured values.
  • AbstractClientRequestService
    • "Decorator" for internal request service
    • Handles request headers authentication
    • Validates the request and response bodies, using Bean Validation
    • Sets MDC context map for AOP logging
  • Email service +
  • API Authorization
    • Secures API endpoints using <ROLE>,<URI> pair list.
    • Requests with valid JWT tokens gets access to their <ROLE> endpoints.
  • Health Indicators and schduled reports
    • Plugins the Spring Auctator

Usage:

1. Maven dependency:

  • Add repository to pom.xml:
<project>
  <!-- ..... -->
  <!-- see https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#publishing-a-package -->
  <distributionManagement>
      <repository>
          <id>github</id>
          <name>GitHub Apache Maven Packages</name>
          <url>https://maven.pkg.github.com/yoga1290/microkernel-core-system</url>
      </repository>
  </distributionManagement>
</project>
  • Another option would be to, clone this repo, and run: mvn clean install

2. Maven dependency:

Add <dependency> into pom.xml of the disered app:

<dependency>
    <groupId>yoga1290</groupId>
    <artifactId>microkernel-core-system</artifactId>
    <version>1.0.0</version>
</dependency>
<!-- TBA: will add <repository> later on; gonna make use of github maven registry & github actions -->

3. Configuration Properties:

To scan the required components/package, you will need to add this entrypoint class:

import yoga1290.commons.ImportCommons;
//...
@SpringBootApplication
@Import({ ImportCommons.class})
//..

References:

About

MicroKernel/Core System module in Plugin Architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages