# feiniaojin/graceful-response

Spring Boot接口响应处理解决方案，提供统一返回值封装、全局异常处理、自定义异常错误码、参数校验增强、断言增强等功能

Repository: https://github.com/feiniaojin/graceful-response
Canonical: https://ross.abutalabs.com/products/graceful-response
Homepage: https://doc.feiniaojin.com
Language: Java
License: MIT
License Family: permissive
Topics: api, java, spring-boot, globalexceptionhandler, restfull
Last push: 2025-03-28T05:05:57+00:00

## Health v2 (maintenance only)
Score: 29/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 13, release rhythm 8, longevity 100
- inputs: {"age_days": 1753, "days_push": 523, "days_rel": 726, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1253, forks 174 (observed 2026-08-28T04:04:08.508055+00:00)

## What it is
Graceful Response is a Spring Boot library that elegantly handles API response processing, including unified response body wrapping, global exception handling, error code population, and exception message internationalization. It reduces boilerplate in controllers by automating response encapsulation and exception-to-response mapping.

## Use cases
- wrap all Spring Boot REST responses in a unified format
- handle global exceptions with consistent error codes
- assign custom error codes to parameter validation failures
- map external third-party exceptions to error codes via annotations
- return proper HTTP status codes for RESTful error responses
- define error code enums instead of many exception classes
- exclude certain endpoints from response wrapping

## When to choose
- you are building Spring Boot REST APIs and want consistent response envelopes
- you want to eliminate repetitive try-catch and response wrapping code in controllers
- you need centralized exception handling with error codes and i18n messages
- you use Spring Boot 2.x or 3.x and want drop-in response handling

## When to avoid
- you are not using the Spring Boot stack
- your project requires fully custom per-endpoint response formats with no wrapping
- you already have a mature in-house response/exception handling framework

## Facets
- artifact type: library
- maturity: active
- function: middleware, error-handling, api-framework, internationalization
- domain: backend, web-development, apis, developer-tools
- platform: jvm
- tags: spring-boot, unified-response, global-exception-handler, error-codes, restful, parameter-validation, assertion-enhancement, spring

## Member repositories
- feiniaojin/graceful-response (main) score 29

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:08.508055+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:28.390118+00:00, confidence not recorded.
  - readme: https://github.com/feiniaojin/graceful-response (fetched 2026-08-28T04:04:08.508055+00:00, sha b20d1dd2358b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
