diff --git a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java index d3713e9cd5..5c369ddc10 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/AbstractRefreshableWebApplicationContext.java @@ -96,7 +96,6 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR /** the ThemeSource for this ApplicationContext. */ @Nullable - @Deprecated private ThemeSource themeSource; @@ -199,7 +198,6 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR * Initialize the theme capability. */ @Override - @Deprecated protected void onRefresh() { this.themeSource = UiApplicationContextUtils.initThemeSource(this); } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java index ad1263a96d..9f473ab600 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/GenericWebApplicationContext.java @@ -86,7 +86,6 @@ public class GenericWebApplicationContext extends GenericApplicationContext private ServletContext servletContext; @Nullable - @Deprecated private ThemeSource themeSource; @@ -198,7 +197,6 @@ public class GenericWebApplicationContext extends GenericApplicationContext * Initialize the theme capability. */ @Override - @Deprecated protected void onRefresh() { this.themeSource = UiApplicationContextUtils.initThemeSource(this); } diff --git a/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java index 5079d62374..2e65cc0afe 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/StaticWebApplicationContext.java @@ -70,7 +70,6 @@ public class StaticWebApplicationContext extends StaticApplicationContext private String namespace; @Nullable - @Deprecated private ThemeSource themeSource; @@ -189,7 +188,6 @@ public class StaticWebApplicationContext extends StaticApplicationContext * Initialize the theme capability. */ @Override - @Deprecated protected void onRefresh() { this.themeSource = UiApplicationContextUtils.initThemeSource(this); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java index b05d8355b2..92f554a3f3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java @@ -129,7 +129,7 @@ import org.springframework.web.util.WebUtils; * Implementations for a fixed theme and for cookie and session storage are included. * The ThemeResolver bean name is "themeResolver"; default is * {@link org.springframework.web.servlet.theme.FixedThemeResolver}. - * Theme support is deprecated as of 6.0 + * Theme support is deprecated as of 6.0 with no direct replacement. * * *
NOTE: The {@code @RequestMapping} annotation will only be processed if a diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java index 30fcf58818..70b15a2f73 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java @@ -235,7 +235,7 @@ public abstract class MvcNamespaceUtils { * Registers an {@link FixedThemeResolver} under a well-known name * unless already registered. */ - @Deprecated + @SuppressWarnings("deprecation") private static void registerThemeResolver(ParserContext context, @Nullable Object source) { if (!containsBeanInHierarchy(context, DispatcherServlet.THEME_RESOLVER_BEAN_NAME)) { RootBeanDefinition beanDef = new RootBeanDefinition(org.springframework.web.servlet.theme.FixedThemeResolver.class); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java index e72b7a88f1..811c01b2c9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java @@ -78,6 +78,7 @@ public class RequestContext { * Only applies to non-DispatcherServlet requests. *
Same as AbstractThemeResolver's default, but not linked in here to avoid package interdependencies. * @see org.springframework.web.servlet.theme.AbstractThemeResolver#ORIGINAL_DEFAULT_THEME_NAME + * @deprecated as of 6.0, with no direct replacement */ @Deprecated public static final String DEFAULT_THEME_NAME = "theme"; @@ -389,6 +390,7 @@ public class RequestContext { /** * Return the current theme (never {@code null}). *
Resolved lazily for more efficiency when theme support is not being used. + * @deprecated as of 6.0, with no direct replacement */ @Deprecated public org.springframework.ui.context.Theme getTheme() { @@ -426,6 +428,7 @@ public class RequestContext { * storing the new theme name through the configured {@link ThemeResolver}. * @param theme the new theme * @see ThemeResolver#setThemeName + * @deprecated as of 6.0, with no direct replacement */ @Deprecated public void changeTheme(@Nullable org.springframework.ui.context.Theme theme) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java index 9b8f05c3a6..b77ed1b3db 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java @@ -182,6 +182,7 @@ public abstract class RequestContextUtils { * DispatcherServlet. * @param request current HTTP request * @return the current ThemeResolver, or {@code null} if not found + * @deprecated as of 6.0, with no direct replacement */ @Nullable @Deprecated @@ -194,6 +195,7 @@ public abstract class RequestContextUtils { * DispatcherServlet. * @param request current HTTP request * @return the current ThemeSource + * @deprecated as of 6.0, with no direct replacement */ @Nullable @Deprecated @@ -207,6 +209,7 @@ public abstract class RequestContextUtils { * @param request current HTTP request * @return the current theme, or {@code null} if not found * @see #getThemeResolver + * @deprecated as of 6.0, with no direct replacement */ @Nullable @Deprecated