Skip to content

TechCeo/Merchants-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merchant API

Merchant API is a Spring Boot REST service for managing merchants and their payment transactions. The project is being modernized as a clean, production-minded Java backend portfolio application with simple architecture, explicit configuration, and database migrations.

Current Stack

  • Java 21
  • Spring Boot 3.5
  • Spring Web
  • Spring Data JPA / Hibernate
  • Oracle JDBC for local and production-style runtime
  • Flyway for SQL database migrations
  • H2 for test execution
  • Maven Wrapper

API Surface

POST /api/v1/merchants
GET  /api/v1/merchants/{merchantId}

POST /api/v1/transactions
GET  /api/v1/transactions
GET  /api/v1/merchants/{merchantId}/transactions

Configuration

Runtime database settings are externalized through environment variables. Local defaults are provided for convenience.

SPRING_DATASOURCE_URL
SPRING_DATASOURCE_USERNAME
SPRING_DATASOURCE_PASSWORD

Default local values:

jdbc:oracle:thin:@localhost:1521:orcl
system
oracle

The application uses Flyway migrations from profile-specific folders:

src/main/resources/db/migration/oracle
src/main/resources/db/migration/h2

JPA schema generation is disabled for safety. Hibernate validates the schema created by Flyway.

Profiles

The default profile targets Oracle using externalized datasource settings.

The test profile uses an in-memory H2 database in Oracle compatibility mode so tests can run without a local Oracle instance.

Build And Test

.\mvnw.cmd clean compile
.\mvnw.cmd clean test

Local Run

Set database credentials if your Oracle setup differs from the defaults:

$env:SPRING_DATASOURCE_URL="jdbc:oracle:thin:@localhost:1521:orcl"
$env:SPRING_DATASOURCE_USERNAME="system"
$env:SPRING_DATASOURCE_PASSWORD="oracle"
.\mvnw.cmd spring-boot:run

About

Enterprise-grade Merchant API modernized from Java 8 to Java 21 and Spring Boot 3.5. Features resource-oriented REST paths, immutable records, Flyway database migrations, RFC 7807 global exception handling, and decoupled slice testing.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages