Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimjuny/kotsu
🌶️ Spring-MVC parameter resolver extension
https://github.com/kimjuny/kotsu
spring spring-mvc spring-web
Last synced: about 2 months ago
JSON representation
🌶️ Spring-MVC parameter resolver extension
- Host: GitHub
- URL: https://github.com/kimjuny/kotsu
- Owner: kimjuny
- Created: 2016-02-25T12:13:35.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-24T05:12:49.000Z (over 8 years ago)
- Last Synced: 2024-10-16T08:41:19.958Z (4 months ago)
- Topics: spring, spring-mvc, spring-web
- Language: Java
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kotsu
A Spring Web MVC extension.* Tired of modeling inputs for every request?
* Don't want to remember every specific parameter validation restrictions?
* Looking for a highly *flexible* & *reusable* & *customizable* replacement for Spring/Hibernate Validator?
This little but powerful Spring extention may bring you a lot help!
### Kotsu Components:
1. Extractor: Automatically extracts parameter according to "Content-Type" header.
2. Validator: Validates input parameter by simple strategies.
3. Assembler: Assemble and return the result.
Each components are reusable & customizable.
### Basic Usage:
```java
@RestController
@RequestMapping("/")
public class TestController {@RequestMapping(value = "",method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_VALUE})
public void api(@Absent(Mapper.PAGE_IDX) Optional pageIdx,
@Absent @VInteger(min = 0, max = 10) Optional pageMax,
@Required(Mapper.MODE) Long mode,
@Required @VString(min = 1, max = 32, regex = "*") String userName) {}
}
```### Requirements:
1. Java 8
2. Spring Web MVC or Spring Boot
3. Latest version of Kotsu
4. Configuration:```xml
```
### Wiki
For a better knowledge of Kotsu usage and requirements please refer to [Kotsu-Wiki](https://github.com/ronankim/kotsu/wiki).