Deprecate Spring JSP theme support for removal in Grails 8.0.0#15457
Merged
jamesfredley merged 1 commit into7.1.xfrom Feb 26, 2026
Merged
Deprecate Spring JSP theme support for removal in Grails 8.0.0#15457jamesfredley merged 1 commit into7.1.xfrom
jamesfredley merged 1 commit into7.1.xfrom
Conversation
Spring's theme support (ThemeSource, Theme, UiApplicationContextUtils, SessionThemeResolver) is deprecated in Spring Framework 6 / Spring Boot 3 and removed in Spring Boot 4. Mark the Grails methods that expose this support as @deprecated(forRemoval = true) so users receive compile-time warnings before the removal in Grails 8.0.0. - GrailsApplicationContext.onRefresh() - theme initialization - GrailsApplicationContext.getTheme(String) - theme lookup - GrailsWebApplicationContext ThemeSource implementation (Javadoc note) Assisted-by: Claude Code <Claude@Claude.ai>
jamesfredley
added a commit
to jamesfredley/grails-core
that referenced
this pull request
Feb 25, 2026
) Spring's theme support (ThemeSource, Theme, ThemeResolver, etc.) was deprecated in Spring Boot 3 / Spring Framework 6 and removed in Spring Boot 4 / Spring Framework 7. Grails deprecated these APIs in 7.1 and now removes them entirely for 8.0. - Delete all vendored Spring theme classes from grails-spring - Remove ThemeSource field, onRefresh() theme init, and getTheme() from GrailsApplicationContext - Remove ThemeSource from GrailsWebApplicationContext implements clause - Remove theme setup from AbstractGrailsTagTests (both copies) - Remove spring:theme JSP tag test (testGRAILS3797) Assisted-by: Claude Code <Claude@Claude.ai>
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR deprecates Spring JSP theme support in Grails to align with Spring Framework's deprecation timeline. Spring deprecated theme support in Spring Boot 3 and will remove it entirely in Spring Boot 4, so Grails is proactively marking these methods for removal in version 8.0.0 to give users time to migrate away from this functionality.
Changes:
- Added
@Deprecatedannotations withsince = "7.1"andforRemoval = trueto theme-related methods inGrailsApplicationContext - Added comprehensive Javadoc explaining the deprecation rationale and timeline
- Documented the deprecation of
ThemeSourceinterface implementation inGrailsWebApplicationContext
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| grails-spring/src/main/groovy/org/grails/spring/GrailsApplicationContext.java | Deprecated onRefresh() and getTheme(String) methods with annotations and Javadoc explaining they will be removed in Grails 8.0.0 |
| grails-web-core/src/main/groovy/grails/web/servlet/context/GrailsWebApplicationContext.java | Added Javadoc note documenting that the ThemeSource interface implementation is deprecated and will be removed in Grails 8.0.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jdaugherty
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GrailsApplicationContext.onRefresh()andGrailsApplicationContext.getTheme(String)as@Deprecated(since = "7.1", forRemoval = true)with Javadoc explaining the rationaleGrailsWebApplicationContextJavadoc for itsThemeSourceinterface implementationMotivation
Spring's theme support (
ThemeSource,Theme,UiApplicationContextUtils,SessionThemeResolver, etc.) is deprecated in Spring Framework 6 / Spring Boot 3 and removed in Spring Boot 4. Grails should surface these deprecation warnings to users now so they can migrate before Grails 8.0.0 removes the support entirely.Changes
GrailsApplicationContext.java@Deprecated(since = "7.1", forRemoval = true)ononRefresh()andgetTheme(String)GrailsWebApplicationContext.javaThemeSourceimplementation