接口的使用
org.springframework.ui.context.Theme
使用Theme的程序包 程序包 说明 org.springframework.ui.context Contains classes defining the application context subinterface for UI applications.org.springframework.ui.context.support Classes supporting the org.springframework.ui.context package.org.springframework.web.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.org.springframework.web.servlet.support Support classes for Spring's web MVC framework.org.springframework.ui.context中Theme的使用
返回Theme的org.springframework.ui.context中的方法 修饰符和类型 方法 说明 Theme
ThemeSource. getTheme(String themeName)
Return the Theme instance for the given theme name.org.springframework.ui.context.support中Theme的使用
实现Theme的org.springframework.ui.context.support中的类 修饰符和类型 类 说明 class
SimpleTheme
DefaultTheme
implementation, wrapping a name and an underlyingMessageSource
.返回Theme的org.springframework.ui.context.support中的方法 修饰符和类型 方法 说明 Theme
DelegatingThemeSource. getTheme(String themeName)
Theme
ResourceBundleThemeSource. getTheme(String themeName)
This implementation returns a SimpleTheme instance, holding a ResourceBundle-based MessageSource whose basename corresponds to the given theme name (prefixed by the configured "basenamePrefix").参数类型为Theme的org.springframework.ui.context.support中的方法 修饰符和类型 方法 说明 protected void
ResourceBundleThemeSource. initParent(Theme theme)
Initialize the MessageSource of the given theme with the one from the corresponding parent of this ThemeSource.org.springframework.web.context.support中Theme的使用
org.springframework.web.servlet.support中Theme的使用
返回Theme的org.springframework.web.servlet.support中的方法 修饰符和类型 方法 说明 protected Theme
RequestContext. getFallbackTheme()
Determine the fallback theme for this context.Theme
RequestContext. getTheme()
Return the current theme (nevernull
).static Theme
RequestContextUtils. getTheme(HttpServletRequest request)
Retrieves the current theme from the given request, using the ThemeResolver and ThemeSource bound to the request by the DispatcherServlet.参数类型为Theme的org.springframework.web.servlet.support中的方法 修饰符和类型 方法 说明 void
RequestContext. changeTheme(Theme theme)
Change the current theme to the specified one, storing the new theme name through the configuredThemeResolver
.