Skip to content

albertorg0/prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prices

API to provide a product's current price given its brand on a specific date.

Getting Started

Prerequisites

  • Java 17
  • Maven
  • IDE (e.g., IntelliJ IDEA, Eclipse)

Build and Run

  1. Clone the repository:

    git clone https://github.com/albertorg0/prices.git
  2. Navigate to the project directory:

    cd prices
  3. Build the project:

    mvn clean install
  4. Run the application:

    mvn spring-boot:run

The application will be accessible at http://localhost:8080.

API Endpoints

Get Price

  • Endpoint: /prices
  • Method: GET
  • Parameters:
    • applicationDate (String): The date and time of the price application (e.g., "2020-06-14T10:00:00").
    • productId (Long): Identifier of the product.
    • brandId (Long): Identifier of the brand.
  • Response:
    • JSON representation of the pricing information, including product and brand identifiers, price list, application dates, and final price.

Running Tests

Run the following command to execute tests:

mvn test

Built With

  • Spring Boot - Framework for building Java-based enterprise applications.
  • H2 Database - In-memory database for development and testing.

Authors

  • Alberto Rojas

License

This Project is licensed under the MIT License.

About

Small Spring-Boot Hexagonal Architecture demo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages