How to load themes from a database in Spring MVC based on user agent, etc.

I am new to Spring web MVC. I am trying to create a simple site with 1 page that will check the users browser and display the current theme for this browser.

If this is a mobile application, I must allow the user to switch the button to a regular site.

Also, the current theme for mobile and non-mobile devices is stored in a database, which includes the start date, end date and topic name. The topic name is the folder where the theme resources are located.

As a newbie, I never used themeresolver.

Your help is greatly appreciated.

+3
source share
1

ThemeResolver .

setThemeName(), UnsupportedOperationException. resolveThemeName():

  • "User-Agent" .
  • ( ).
  • .

themeResolver .

+3

Source: https://habr.com/ru/post/1719451/


All Articles