How to load themes from a database in Spring MVC?

I will have one site that should be thematic. I want to pull topic information from the database to get rid of the need to redeploy each time a new topic is needed. I read that you can create a custom implementation of ThemeSource, but don’t know how to implement a database based theme source. Does anyone have any experience with this in Spring MVC?

+5
source share
1 answer

It's simple.

Spring Controller, no filter controllers are easier to connect.

  • Make the theme simple (one css file, one js file, several images), this will help.

  • themeresource . theme_id, theme_name, theme_description. themeresource resource_id, theme_id, , (blob). ( Hibernate)

  • DAO ( Hibernate)

  • ThemeController. "/theme/resources".

  • , , (:/theme/resources/style.css).

  • , - ThemeResolver

  • style.css( ) , DAO

- /, , .

+2

All Articles