Browse Source

Fix locale interceptor code snippet

See gh-36105
See gh-36099
pull/36110/head
Sébastien Deleuze 4 weeks ago
parent
commit
192da6229c
  1. 2
      framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet/localeresolver.adoc
  2. 2
      framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcservlet/mvclocaleresolverinterceptor/WebConfiguration.kt

2
framework-docs/modules/ROOT/pages/web/webmvc/mvc-servlet/localeresolver.adoc

@ -83,4 +83,4 @@ that contain a parameter named `siteLanguage` now changes the locale. So, for ex
a request for the URL `https://domain.com/home.view?siteLanguage=nl` changes the site a request for the URL `https://domain.com/home.view?siteLanguage=nl` changes the site
language to Dutch. The following example shows how to intercept the locale: language to Dutch. The following example shows how to intercept the locale:
include-code::./WebConfiguration[tag=snippet,indent=0] include-code::./WebConfiguration[tag=snippet,indent=0,chomp=-tags]

2
framework-docs/src/main/kotlin/org/springframework/docs/web/webmvc/mvcservlet/mvclocaleresolverinterceptor/WebConfiguration.kt

@ -37,7 +37,7 @@ class WebConfiguration {
setInterceptors(LocaleChangeInterceptor().apply { setInterceptors(LocaleChangeInterceptor().apply {
paramName = "siteLanguage" paramName = "siteLanguage"
}) })
/* @chomp:line urlMap = mapOf("/**/*.view" to "someController") */urlMap = mapOf("/**/*.view" to "someController") urlMap = mapOf("/**/*.view" to "someController")
} }
} }
// end::snippet[] // end::snippet[]

Loading…
Cancel
Save