Skip to content

freelancer marketplace: shared library between other services - final project of hammasir bootcamp | Here, items that are shared between multiple services are handled, and with this library, we maintain the DRY principle

License

Notifications You must be signed in to change notification settings

rahmasir/fm-shared-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shared Library (fm-shared-lib)

This module is a standard Java library (JAR) that contains code shared across multiple microservices in the Freelancer Market project.

Purpose

The primary purpose of this library is to enforce the DRY (Don't Repeat Yourself) principle and ensure consistency. It contains common classes that are used for communication and data representation between services.

Contents

  • Enums: Common enumerations like UserRole, ProjectStatus, and ApplicationStatus.
  • DTOs (Future): Data Transfer Objects that might be used for inter-service communication.
  • Custom Exceptions (Future): Shared exception classes if a common error-handling pattern across services is desired.

Important Notes

  • This is NOT a runnable application. It does not contain a main method or the Spring Boot plugin. It is a simple library that gets packaged as a .jar file.
  • It is framework-agnostic and does not contain any Spring dependencies to keep it lightweight.

Usage

Other services, like fm-user-service and fm-project-service, include this library as a standard Maven dependency in their pom.xml file:

<dependency>
    <groupId>org.rahmasir</groupId>
    <artifactId>fm-shared-lib</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>

JITPACK

you can check it here: rahmasir/fm-shared-lib. I guess it doesn't work but you can use this with its parent pom.xml in fm-hub.

To get this Git project into your build:

  1. Add the JitPack repository to your build file

    Add to pom.xml

    <repositories>
     <repository>
       <id>jitpack.io</id>
       <url>https://jitpack.io</url>
     </repository>
    </repositories>
  2. Add the dependency

    <dependency>
      <groupId>com.github.rahmasir</groupId>
      <artifactId>fm-shared-lib</artifactId>
      <version>v1.0.0</version>
    </dependency>

About

freelancer marketplace: shared library between other services - final project of hammasir bootcamp | Here, items that are shared between multiple services are handled, and with this library, we maintain the DRY principle

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages