Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RecordIO Logo

RecordIO Spring Boot Starter

Effortless HTTP request/response recording for Spring Boot applications

Spring Boot 3.2+ Java 17+ License


Features

  • Annotation-driven - Simply add @RecordIO to controllers or methods
  • Organized folder structure - Files organized by Controller/Method/request|response
  • Separate request/response files - Request and response saved independently
  • Automatic masking - Protect sensitive data like passwords and tokens
  • Flexible output - JSON or XML format with optional pretty printing
  • Async writing - Non-blocking file operations for minimal latency impact
  • File rotation - Automatic cleanup based on file count or age
  • Conditional recording - Record always, on errors only, or for slow responses

Quick Start

1. Add Dependency

Maven:

<dependency>
    <groupId>io.github.talayash</groupId>
    <artifactId>recordio-spring-boot-starter</artifactId>
    <version>1.0.3</version>
</dependency>

Gradle:

implementation 'io.github.talayash:recordio-spring-boot-starter:1.0.3'

2. Annotate Your Controller

@RestController
@RecordIO
public class BookingController {

    @PostMapping("/bookings")
    public Booking createBooking(@RequestBody BookingRequest request) {
        // All requests/responses are automatically recorded
        return bookingService.create(request);
    }
}

3. Check Output

Files are organized in a structured folder hierarchy:

records/
└── BookingController/
    └── createBooking/
        ├── request/
        │   └── 20260125_143052_123_a1b2c3d4.json
        └── response/
            └── 20260125_143052_123_a1b2c3d4.json

4. Configure (Optional)

recordio:
  enabled: true
  base-folder: records
  format: JSON
  masking:
    patterns:
      - password
      - token
      - cardNumber
  file-rotation:
    max-files: 100
    max-age-days: 7

Annotation Options

Option Default Description
enabled true Enable/disable recording
folder records Base output directory
format JSON Output format (JSON/XML)
maskFields [] Fields to mask
includeHeaders true Include HTTP headers
condition ALWAYS When to record (ALWAYS/ON_ERROR/SLOW_RESPONSE)
async true Write files asynchronously

License

MIT

About

Effortless HTTP traffic recording for Spring Boot. Just add @Recordio to capture requests/responses with built-in masking, file rotation, and JSON/XML output.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages