Browse Source

Merge branch '4.0.x'

pull/49658/head
Brian Clozel 2 days ago
parent
commit
8bcb7fed18
  1. 3
      module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java
  2. 4
      module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMappingTests.java
  3. 3
      module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/endpoint/web/AbstractWebMvcEndpointHandlerMapping.java
  4. 4
      module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/endpoint/web/AbstractWebMvcEndpointHandlerMappingTests.java

3
module/spring-boot-webflux/src/main/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMapping.java

@ -555,6 +555,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi @@ -555,6 +555,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi
this.responseStatus = responseStatus;
}
@Reflective
Mono<Void> handle(ServerWebExchange exchange) {
ServerHttpResponse response = exchange.getResponse();
response.setStatusCode(this.responseStatus);
@ -623,7 +624,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi @@ -623,7 +624,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
this.reflectiveRegistrar.registerRuntimeHints(hints, WriteOperationHandler.class,
ReadOperationHandler.class);
ReadOperationHandler.class, CatchAllHandler.class);
}
}

4
module/spring-boot-webflux/src/test/java/org/springframework/boot/webflux/actuate/endpoint/web/AbstractWebFluxEndpointHandlerMappingTests.java

@ -45,6 +45,10 @@ class AbstractWebFluxEndpointHandlerMappingTests { @@ -45,6 +45,10 @@ class AbstractWebFluxEndpointHandlerMappingTests {
.onType(TypeReference
.of("org.springframework.boot.webflux.actuate.endpoint.web.AbstractWebFluxEndpointHandlerMapping.ReadOperationHandler")))
.accepts(runtimeHints);
assertThat(RuntimeHintsPredicates.reflection()
.onType(TypeReference
.of("org.springframework.boot.webflux.actuate.endpoint.web.AbstractWebFluxEndpointHandlerMapping.CatchAllHandler")))
.accepts(runtimeHints);
}
}

3
module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc/actuate/endpoint/web/AbstractWebMvcEndpointHandlerMapping.java

@ -494,6 +494,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin @@ -494,6 +494,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
this.responseStatus = responseStatus;
}
@Reflective
void handle(HttpServletResponse response) {
response.setStatus(this.responseStatus.value());
}
@ -559,7 +560,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin @@ -559,7 +560,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
this.reflectiveRegistrar.registerRuntimeHints(hints, OperationHandler.class);
this.reflectiveRegistrar.registerRuntimeHints(hints, OperationHandler.class, CatchAllHandler.class);
}
}

4
module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/endpoint/web/AbstractWebMvcEndpointHandlerMappingTests.java

@ -40,6 +40,10 @@ class AbstractWebMvcEndpointHandlerMappingTests { @@ -40,6 +40,10 @@ class AbstractWebMvcEndpointHandlerMappingTests {
.onType(TypeReference
.of("org.springframework.boot.webmvc.actuate.endpoint.web.AbstractWebMvcEndpointHandlerMapping.OperationHandler")))
.accepts(runtimeHints);
assertThat(RuntimeHintsPredicates.reflection()
.onType(TypeReference
.of("org.springframework.boot.webmvc.actuate.endpoint.web.AbstractWebMvcEndpointHandlerMapping.CatchAllHandler")))
.accepts(runtimeHints);
}
}

Loading…
Cancel
Save