Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arjundandagi/spring-boot-quick-tricks

bunch of template codes :books: to copy paste to quickly get there :smile: :rocket:
https://github.com/arjundandagi/spring-boot-quick-tricks

spring-boot spring-boot-2 spring-boot-starter

Last synced: about 15 hours ago
JSON representation

bunch of template codes :books: to copy paste to quickly get there :smile: :rocket:

Awesome Lists containing this project

README

        

# spring-boot-quick-tricks
bunch of template code to copy paste to quickly get there :)

# Redirect and multiple mappings to single method

```
@GetMapping(value = {"/","/foo"})
public void handleFoo(HttpServletResponse response) throws IOException {
response.sendRedirect("/hello");
}
@GetMapping("/hello")
public String hmm(){
return "Hello";
}
```
you can also use with [RequestPath](https://stackoverflow.com/questions/22094609/multiple-mappings-to-the-same-method-of-a-controller-in-spring)