Skip to content

gitsyong/marketBack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YUJU Employee Benefits Backend

Spring Boot backend service for the YUJU Employee Benefits E-commerce System.

Technology Stack

  • Framework: Spring Boot 3.2.0
  • Language: Java 17
  • Database: MySQL 8.0
  • Cache: Redis
  • ORM: MyBatis Plus
  • Security: Spring Security + JWT
  • Build Tool: Maven

Project Structure

backend/
├── src/
│   ├── main/
│   │   ├── java/com/yuju/benefits/
│   │   │   ├── controller/      # REST API endpoints
│   │   │   ├── service/         # Business logic
│   │   │   ├── repository/      # Data access (MyBatis Mappers)
│   │   │   ├── entity/          # Database entities
│   │   │   ├── dto/             # Data Transfer Objects
│   │   │   ├── config/          # Configuration classes
│   │   │   ├── exception/       # Custom exceptions
│   │   │   └── util/            # Utility classes
│   │   └── resources/
│   │       ├── application.yml  # Main configuration
│   │       ├── application-dev.yml
│   │       ├── application-test.yml
│   │       ├── application-prod.yml
│   │       └── mapper/          # MyBatis XML mappers
│   └── test/                    # Test classes
└── pom.xml                      # Maven dependencies

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • MySQL 8.0+
  • Redis 6.0+

Setup

  1. Create Database

    CREATE DATABASE yuju_benefits CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
  2. Configure Database Connection

    Edit src/main/resources/application-dev.yml:

    spring:
      datasource:
        url: jdbc:mysql://localhost:3306/yuju_benefits
        username: your_username
        password: your_password
  3. Configure Redis

    Edit src/main/resources/application-dev.yml:

    spring:
      data:
        redis:
          host: localhost
          port: 6379
          password: your_password  # Leave empty if no password
  4. Build Project

    mvn clean install
  5. Run Application

    mvn spring-boot:run

    The application will start on http://localhost:8080/api

API Documentation

Once the application is running, API documentation will be available at:

  • Swagger UI: http://localhost:8080/api/swagger-ui.html (to be configured in task 1.2)

Testing

Run all tests:

mvn test

Run property-based tests:

mvn test -Dtest=**/*PropertyTest

Configuration

Key configuration properties in application.yml:

  • JWT Settings: Token expiration, secret key
  • Security: Password encoder strength, login attempts
  • Inventory: Low stock threshold
  • Cart: Item expiry, reservation timeout
  • Points: Monthly grant amount and schedule

Development

Active profile is set to dev by default. Change it in application.yml:

spring:
  profiles:
    active: dev  # dev, test, or prod

License

Internal use only - YUJU Corporation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors