RouterFunctionMapping provides getter for RouterFunction

Issue: SPR-15991
This commit is contained in:
Rossen Stoyanchev
2017-09-22 15:15:41 -04:00
parent 31619b3ffb
commit 816a58fcf9
3 changed files with 18 additions and 9 deletions

View File

@@ -70,6 +70,18 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini
}
/**
* Return the configured {@link RouterFunction}.
* <p><strong>Note:</strong> When router functions are detected from the
* ApplicationContext, this method may return {@code null} if invoked
* prior to {@link #afterPropertiesSet()}.
* @return the router function or {@code null}
*/
@Nullable
public RouterFunction<?> getRouterFunction() {
return this.routerFunction;
}
/**
* Configure HTTP message readers to de-serialize the request body with.
* <p>By default this is set to the {@link ServerCodecConfigurer}'s defaults.