diff --git a/grails-spring/src/main/groovy/org/grails/spring/GrailsApplicationContext.java b/grails-spring/src/main/groovy/org/grails/spring/GrailsApplicationContext.java index e0e85ad219a..40bbe2daa82 100644 --- a/grails-spring/src/main/groovy/org/grails/spring/GrailsApplicationContext.java +++ b/grails-spring/src/main/groovy/org/grails/spring/GrailsApplicationContext.java @@ -98,12 +98,25 @@ public void setMetaClass(MetaClass metaClass) { /** * Initialize the theme capability. + * + * @deprecated since 7.1, for removal in 8.0. Spring's theme support ({@link ThemeSource}, + * {@link UiApplicationContextUtils#initThemeSource}) is deprecated in Spring Boot 3 and + * removed in Spring Boot 4. This method will be removed in Grails 8.0.0. */ + @Deprecated(since = "7.1", forRemoval = true) @Override protected void onRefresh() { themeSource = UiApplicationContextUtils.initThemeSource(this); } + /** + * Return the {@link Theme} instance for the given theme name. + * + * @deprecated since 7.1, for removal in 8.0. Spring's theme support ({@link ThemeSource}, + * {@link Theme}) is deprecated in Spring Boot 3 and removed in Spring Boot 4. + * This method will be removed in Grails 8.0.0. + */ + @Deprecated(since = "7.1", forRemoval = true) public Theme getTheme(String themeName) { return themeSource.getTheme(themeName); } diff --git a/grails-web-core/src/main/groovy/grails/web/servlet/context/GrailsWebApplicationContext.java b/grails-web-core/src/main/groovy/grails/web/servlet/context/GrailsWebApplicationContext.java index 46fe8cbb13c..fa91e4b9eaf 100644 --- a/grails-web-core/src/main/groovy/grails/web/servlet/context/GrailsWebApplicationContext.java +++ b/grails-web-core/src/main/groovy/grails/web/servlet/context/GrailsWebApplicationContext.java @@ -48,6 +48,10 @@ * A WebApplicationContext that extends StaticApplicationContext to allow for programmatic * configuration at runtime. The code is adapted from StaticWebApplicationContext. * + *
Note: The {@link ThemeSource} interface implementation is deprecated since Grails 7.1 and + * will be removed in Grails 8.0.0. Spring's theme support is deprecated in Spring Boot 3 and + * removed in Spring Boot 4. + * * @author Graeme * @since 0.3 */