lex
06/15/2017, 11:38 AMrpalcolea
06/16/2017, 2:59 PMrpalcolea
06/16/2017, 3:11 PMHttpClient
with 8 workers for the loopResources
sdeleuze
06/16/2017, 3:45 PMsdeleuze
06/16/2017, 3:46 PMsdeleuze
06/16/2017, 3:46 PMNettyOptions
for more details (EventLoopGroup
related methods, etc.)rpalcolea
06/16/2017, 4:50 PM123
06/16/2017, 7:57 PMsdeleuze
06/19/2017, 1:19 PMziad
06/20/2017, 4:59 PMziad
06/20/2017, 5:00 PMorangy
ziad
06/20/2017, 5:04 PMziad
06/20/2017, 5:04 PMleodeng
06/20/2017, 5:18 PMdariuszbacinski
06/20/2017, 5:57 PMdariuszbacinski
06/20/2017, 5:58 PMziad
06/20/2017, 11:06 PMCzar
06/21/2017, 8:17 AM@RestController("/api")
open class HelloController {
@GetMapping("/hello")
open fun hello(): String = "Hello!"
}
Spring completely ignores "/api"
and maps to my.domain/hello
instead of my.domain/api/hello
. Am I missing something or it's a bug?
UPDATE: My bad, @RestController
annotation's value
denotes component name, not request mapping part.sdeleuze
06/21/2017, 8:27 AMnfrankel
06/23/2017, 8:05 AMgregd
06/23/2017, 11:50 AMgdrouet
06/26/2017, 9:18 AMmethod(POST)
and contentType(APPLICATION_JSON)
without an additional call to nest
@Bean
open fun apiRouter() = router {
"/".nest {
method(OPTIONS, {
ALLOW_CROSS_ORIGIN_RESPONSE
})
method(POST).nest {
contentType(APPLICATION_JSON) {
req -> ::myHandler
}
}
}
}
sdeleuze
06/26/2017, 9:43 AMxantier
06/26/2017, 9:43 AMsdeleuze
06/26/2017, 9:44 AM@Bean
fun apiRouter() = router {
method(OPTIONS) { ALLOW_CROSS_ORIGIN_RESPONSE }
method(POST).nest {
contentType(APPLICATION_JSON, this@ApiRoutes::myHandler)
}
}
or
@Bean
fun apiRouter() = router {
method(OPTIONS) { ALLOW_CROSS_ORIGIN_RESPONSE }
(method(POST) and contentType(APPLICATION_JSON)).invoke(this@ApiRoutes::myHandler)
}
sdeleuze
06/26/2017, 9:46 AMCorsWebFilter
to the upcoming Spring Framework 5.0 RC3 (available in snapshots) https://jira.spring.io/browse/SPR-15567sdeleuze
06/26/2017, 9:47 AMsdeleuze
06/26/2017, 9:47 AMsdeleuze
06/26/2017, 9:47 AM