-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as not planned
Closed as not planned
Copy link
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.com
Description
my code
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.EntityResponse;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;
import java.util.Collections;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
@Bean
RouterFunction<ServerResponse> routerFunction() {
return route()
.GET("test", request -> {
// `EntityResponse` or `RenderingResponse`
return EntityResponse
.fromObject(Collections.singletonMap("Key", "Value"))
.build();
})
.build();
}ide error tips
Bad return type in lambda expression: Mono<EntityResponse<Map<String, String>>> cannot be converted to Mono<ServerResponse>Is this normal? Or is this API not intended for this location. I didn't mention it when I read the document
Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.com