Bu proje, Departman Servisi ve Çalışan Servisi olmak üzere iki mikroservis içerir.
Departman Servisi departmanları ve bunlara bağlı çalışanları yönetir. Çalışan Servisi çalışan kayıtlarını yönetir ve departmana göre sorgulama yapar. Gereksinimler Java 17 veya daha yenisi Maven 3.6 veya daha yenisi Docker (isteğe bağlı, konteynerizasyon için) PostgreSQL (veya başka bir veritabanı, yapılandırılmışsa) Başlarken Depoyu Klonlayın
git clone https://github.com/your-repo/department-employee-microservices.git cd department-employee-microservices Projeyi Derleyin
Her mikroservis dizinine gidip projeyi Maven ile derleyin:
cd department-service mvn clean install
cd ../employee-service mvn clean install Mikroservisleri Çalıştırın
Her mikroservisi ayrı ayrı çalıştırabilirsiniz:
cd department-service mvn spring-boot:run
cd ../employee-service mvn spring-boot:run Alternatif olarak, Docker kullanıyorsanız, imajları oluşturup konteynerleri çalıştırabilirsiniz:
docker build -t department-service -f department-service/Dockerfile . docker build -t employee-service -f employee-service/Dockerfile .
docker run -p 8080:8080 department-service docker run -p 8081:8081 employee-service
This project includes two microservices: Department Service and Employee Service.
Department Service manages departments and their associated employees. Employee Service handles employee records and allows querying based on department. Prerequisites Java 17 or later Maven 3.6 or later Docker (optional, for containerization) PostgreSQL (or any other database if configured) Getting Started Clone the Repository
bash git clone https://github.com/your-repo/department-employee-microservices.git cd department-employee-microservices Build the Project
Navigate to each microservice directory and build the project using Maven:
bash cd department-service mvn clean install
cd ../employee-service mvn clean install Run the Microservices
You can run each microservice individually using:
bash
cd department-service mvn spring-boot:run
cd ../employee-service mvn spring-boot:run Alternatively, if you are using Docker, build and run the containers:
bash
docker build -t department-service -f department-service/Dockerfile . docker build -t employee-service -f employee-service/Dockerfile .
docker run -p 8080:8080 department-service docker run -p 8081:8081 employee-service