kenkyee: That would indeed work as GET("/{id}/hello"). But obviously this is a trivialized simple example that doesn't work as I would expect. The idea is to add nested routes programmatically. Something like:
Is there a use case for this? I haven't used this new spring feature yet... We've always done it the other way...
s
strelok
03/02/2017, 12:19 PM
sure there is a use case ... i was successful in implementing basically an abstract CRUD "router" which would work for every entity type with the basic GET/POST/PUT/DELETE functionality. The controller also allows an extension point to add nested routes for additional functionality for each entity
k
kenkyee
03/02/2017, 2:08 PM
Ahhh.. Interesting. We've always done different endpoints for different types.
s
strelok
03/02/2017, 2:39 PM
Yeah, with the new functional webflux APIs it is now possible to do stuff that traditional annotation approach does not allow. Although I'm mindful of descending into NodeJS style "callback hell". Hopefully it won't happen.