File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/configuration Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 11package org .lowcoder .api .framework .configuration ;
22
3+ import com .fasterxml .jackson .databind .ObjectMapper ;
4+ import lombok .RequiredArgsConstructor ;
35import org .lowcoder .api .framework .plugin .endpoint .ReloadableRouterFunctionMapping ;
46import org .springframework .context .annotation .Configuration ;
7+ import org .springframework .http .codec .ServerCodecConfigurer ;
8+ import org .springframework .http .codec .json .Jackson2JsonDecoder ;
9+ import org .springframework .http .codec .json .Jackson2JsonEncoder ;
510import org .springframework .web .reactive .config .WebFluxConfigurationSupport ;
611import org .springframework .web .reactive .function .server .support .RouterFunctionMapping ;
712
13+ @ RequiredArgsConstructor
814@ Configuration
915public class CustomWebFluxConfigurationSupport extends WebFluxConfigurationSupport
1016{
17+ private final ObjectMapper objectMapper ;
18+
1119 @ Override
1220 protected RouterFunctionMapping createRouterFunctionMapping ()
1321 {
1422 return new ReloadableRouterFunctionMapping ();
1523 }
24+
25+
26+ @ Override
27+ protected void configureHttpMessageCodecs (ServerCodecConfigurer configurer ) {
28+ configurer .defaultCodecs ()
29+ .jackson2JsonDecoder (new Jackson2JsonDecoder (objectMapper ));
30+ configurer .defaultCodecs ()
31+ .jackson2JsonEncoder (new Jackson2JsonEncoder (objectMapper ));
32+ }
1633}
You can’t perform that action at this time.
0 commit comments