Better test of whether webflux is present

This commit is contained in:
Dave Syer
2020-11-20 09:17:15 +00:00
parent a1e9b6b2c1
commit 685f1a1b8f

View File

@@ -80,7 +80,8 @@ import static org.springframework.web.reactive.function.server.ServerResponse.st
*/
class FunctionEndpointInitializer implements ApplicationContextInitializer<GenericApplicationContext> {
private static boolean webflux = ClassUtils.isPresent("org.springframework.http.server.reactive.HttpHandler", null);
private static boolean webflux = ClassUtils
.isPresent("org.springframework.web.reactive.function.server.RouterFunction", null);
@Override
public void initialize(GenericApplicationContext context) {