Skip to content

Result entity wrapper class, including return value status, object, error information, etc

Notifications You must be signed in to change notification settings

lovepoem/smart-result

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

smart-result

Code description

  • Java generic implementation version of Golang with multiple return values (including error and data)
  • Result entity wrapper class, including return value status, object, error information, etc

maven dependency

        <dependency>
            <groupId>io.wangxin</groupId>
            <artifactId>smart-result</artifactId>
            <version>1.0.0</version>
        </dependency>

Introduction to some classes

Unified api return result entity object
Unified error code abstract interface, each project uses its own implementation enumeration class to put error code.
The result encapsulation util tool is a rich method. Support error code enumeration class, error code plus exception information, exception and other error result encapsulation.
SmartException: Common Exception with  @see IFailCode

Some conventions

  • Use result and resultutils to encapsulate the API return value. It can return status value and corresponding result at the same time.

About

Result entity wrapper class, including return value status, object, error information, etc

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages