spring - How to switch back to default theme, if user specified theme property file is not present in application? -


i have 3 theme property files:- 1) theme-fr_ca 2) theme-fr_us 3) theme-en_us

in spring application based on user locale theme applied. but, problem if there unknown locale 'ch_rs' want fall theme belonging en_us locale theme-en_us file.

please find below code:-

    <bean id="themesource"       class="org.springframework.ui.context.support.resourcebundlethemesource">     <property name="basenameprefix" value="theme-" /> </bean>  <bean id="themeresolver"   class="org.springframework.web.servlet.theme.cookiethemeresolver">     <property name="defaultthemename" value="en_us" /> </bean> 

how can achieve this? appreciated.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -