Class SemanticApiVersionParser
java.lang.Object
org.springframework.web.accept.SemanticApiVersionParser
- All Implemented Interfaces:
ApiVersionParser<SemanticApiVersionParser.Version>
public class SemanticApiVersionParser
extends Object
implements ApiVersionParser<SemanticApiVersionParser.Version>
Parser for semantic API versioning with major, minor, and patch values.
For example, "1", "1.0", "1.2", "1.2.0", "1.2.3". Leading, non-integer
characters, as in "v1.0", are skipped.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresentation of a semantic version. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SemanticApiVersionParser
public SemanticApiVersionParser()
-
-
Method Details
-
parseVersion
Description copied from interface:ApiVersionParserParse the version into an Object.- Specified by:
parseVersionin interfaceApiVersionParser<SemanticApiVersionParser.Version>- Parameters:
version- the value to parse- Returns:
- an Object that represents the version
-