Skip to content

The Catalog Service Project is a robust Spring Boot application tailored for managing and retrieving product information via RESTful APIs. Leveraging Spring Data JPA for streamlined data persistence and Eureka for service discovery, this project facilitates efficient communication in a microservices architecture.

Notifications You must be signed in to change notification settings

krishnamodi-1108/Catalog-Service-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Catalog Service Project

Catalog Service Project is a Spring Boot application designed to manage and retrieve product information through RESTful APIs. It uses Spring Data JPA for data persistence and integrates with Eureka for service discovery.

Functionality

Product Entity

The application defines a Product entity with the following attributes:

  • ProductId: Unique identifier for the product.
  • code: Product code.
  • name: Product name.
  • description: Product description.
  • price: Product price.

DAO Layer

The data access layer is implemented using Spring Data JPA with the ProductDao interface. It provides methods to interact with the underlying database, such as retrieving all products and finding a product by its code.

Service Layer

The service layer, implemented by ProductServiceImpl, contains business logic for handling product-related operations. It interfaces with the ProductDao to retrieve and process data.

RESTful API

The application exposes RESTful APIs through the ProductResource class. These APIs include:

  • GET /products: Retrieve a list of all products.
  • GET /products/code/{productCode}: Retrieve a product by its code.

Configuration

The application is configured to connect to a MySQL database with the provided datasource settings. Eureka client configuration is also included for service registration and discovery.

Getting Started

  1. Clone the Repository:

    git clone https://github.com/krishna-kusum/Catalog-Service-Project.git
    cd catalog-service
  2. Database Configuration: Update the application.properties file with your MySQL database credentials.

  3. Run the Application:

    ./mvnw spring-boot:run
  4. Open in Browser: Visit http://localhost:8080 to access the Catalog Service APIs.

Dependencies

  • Spring Boot
  • Spring Data JPA
  • Eureka Client
  • MySQL Database

Feel free to contribute, report issues, or suggest improvements. Happy cataloging!

About

The Catalog Service Project is a robust Spring Boot application tailored for managing and retrieving product information via RESTful APIs. Leveraging Spring Data JPA for streamlined data persistence and Eureka for service discovery, this project facilitates efficient communication in a microservices architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages