File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
main/java/io/vertigo/ui/impl/springmvc/config Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 41
41
import org .springframework .web .method .support .HandlerMethodReturnValueHandler ;
42
42
import org .springframework .web .multipart .support .StandardServletMultipartResolver ;
43
43
import org .springframework .web .servlet .DispatcherServlet ;
44
+ import org .springframework .web .servlet .LocaleResolver ;
44
45
import org .springframework .web .servlet .RequestToViewNameTranslator ;
45
46
import org .springframework .web .servlet .config .annotation .EnableWebMvc ;
46
47
import org .springframework .web .servlet .config .annotation .InterceptorRegistry ;
@@ -335,7 +336,12 @@ public void addResourceHandlers(final ResourceHandlerRegistry registry) {
335
336
registry .addResourceHandler ("/vertigo-ui/static/**" )
336
337
.addResourceLocations ("classpath:/io/vertigo/ui/static/" )
337
338
.setCacheControl (CacheControl .maxAge (2 , TimeUnit .HOURS ).cachePublic ());
339
+ }
338
340
341
+ @ Bean
342
+ public LocaleResolver localeResolver () {
343
+ // project can override this method or provide a LocaleResolver bean marked with @Primary
344
+ return new VertigoLocaleResolver ();
339
345
}
340
346
341
347
protected boolean isDevMode () {
Original file line number Diff line number Diff line change 17
17
*/
18
18
package io .vertigo .ui ;
19
19
20
- import org .springframework .context .annotation .Bean ;
21
20
import org .springframework .context .annotation .ComponentScan ;
22
- import org .springframework .web .servlet .LocaleResolver ;
23
21
24
22
import io .vertigo .ui .impl .springmvc .config .VSpringWebConfig ;
25
- import io .vertigo .ui .impl .springmvc .config .VertigoLocaleResolver ;
26
23
27
24
@ ComponentScan ("io.vertigo.ui.data.controllers" )
28
25
public class TestVSpringWebConfig extends VSpringWebConfig {
29
26
// nothing basic config is enough
30
27
31
- @ Bean
32
- public LocaleResolver localeResolver () {
33
- return new VertigoLocaleResolver ();
34
- }
35
28
}
You can’t perform that action at this time.
0 commit comments