Skip to content

Conversation

@cprayer
Copy link
Contributor

@cprayer cprayer commented Mar 3, 2021

/**
* Return a {@link RouterFunctionMapping} ordered at 3 to map
* {@linkplain org.springframework.web.servlet.function.RouterFunction router functions}.
* Consider overriding one of these other more fine-grained methods:
* <ul>
* <li>{@link #addInterceptors} for adding handler interceptors.
* <li>{@link #addCorsMappings} to configure cross origin requests processing.
* <li>{@link #configureMessageConverters} for adding custom message converters.
* <li>{@link #configurePathMatch(PathMatchConfigurer)} for customizing the {@link PathPatternParser}.
* </ul>
* @since 5.2
*/
@Bean
public RouterFunctionMapping routerFunctionMapping(
@Qualifier("mvcConversionService") FormattingConversionService conversionService,
@Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) {
RouterFunctionMapping mapping = new RouterFunctionMapping();
mapping.setOrder(3);
mapping.setInterceptors(getInterceptors(conversionService, resourceUrlProvider));
mapping.setCorsConfigurations(getCorsConfigurations());
mapping.setMessageConverters(getMessageConverters());
PathPatternParser patternParser = getPathMatchConfigurer().getPatternParser();
if (patternParser != null) {
mapping.setPatternParser(patternParser);
}
return mapping;
}

I updated the Javadoc to document RouterFunctionMapping, which was missing.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 3, 2021
@sbrannen sbrannen self-assigned this Mar 3, 2021
@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 3, 2021
@sbrannen sbrannen added this to the 5.3.5 milestone Mar 3, 2021
@sbrannen sbrannen changed the title Update javadoc for WebMvcConfigurationSupport Add RouterFunctionMapping to Javadoc for WebMvcConfigurationSupport Mar 3, 2021
@sbrannen sbrannen merged commit b9a612b into spring-projects:master Mar 3, 2021
@sbrannen
Copy link
Member

sbrannen commented Mar 3, 2021

This has been merged into master.

Thanks

@cprayer cprayer deleted the update-javadoc branch March 3, 2021 13:49
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants