Mike Saubier
10/27/2025, 8:14 PMuser
10/27/2025, 8:14 PMmatchAll(), and properties like request and response, are still available, but you must ensure your interceptor classes implement the grails.artefact.Interceptor trait, which provides these methods and properties. If you are missing imports or your IDE cannot resolve them, check that your project dependencies include org.apache.grails:grails-interceptors and that your source files are in the correct location (typically grails-app/controllers or grails-app/interceptors). For HIGHEST_PRECEDENCE, a static import from org.springframework.core.Ordered is required. For matchAll(), ensure your constructor calls it, and for `request`/`response`, confirm your class is recognized as an interceptor artifact so the trait is applied. See Grails Interceptor docs and API reference.
For community support, the best places are the Grails Slack, the Grails mailing list, and GitHub Discussions on the Grails Core repository. Stack Overflow is still used, but the official channels are more active since the move to Apache.
Would you like more detail on resolving these specific issues or on the upgrade process in general?
Sources:
- Grails Interceptor docs
- Grails Interceptor API 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.user
10/27/2025, 8:14 PMuser
10/27/2025, 8:15 PMHIGHEST_PRECEDENCE now requires a static import. This is expected, as Grails 7 has moved many classes and constants to new packages under org.apache.grails. Make sure you’re importing from the correct package, for example: groovy import static org.grails.datastore.mapping.core.order.OrderedComparator.HIGHEST_PRECEDENCE or groovy import static org.springframework.core.Ordered.HIGHEST_PRECEDENCE depending on your use case and what is available in your classpath. ### 2. Interceptor Methods: matchAll(), match(), etc. The matchAll() and match() methods are not properties but methods provided by the [Interceptor trait](https://grails.apache.org/docs/latest/api/grails/artefact/Interceptor.html). Make sure your interceptor class is defined correctly and that you are not trying to use these as properties. For example: groovy class MyInterceptor { MyInterceptor() { matchAll() // or match(controller: 'book', action: 'show') } // ... } If these methods are not being resolved, double-check: - Your imports and classpath (ensure you are using Grails 7 dependencies and not mixing with older Grails 6 or 5 artifacts). - That your IDE has re-indexed and re-imported the Gradle project after the upgrade. ### 3. Request/Response Properties The request and response objects should still be available in interceptors, as they are part of the web context. If they are not being resolved: - Ensure your interceptor is in the correct package and is being recognized as a Grails artefact. - Try a clean build (./gradlew clean build) and re-import the project in IntelliJ. ### 4. IDE Issues There are known issues with IntelliJ IDEA and Grails 7 support, especially around code resolution and ambiguous method calls. The Grails team is tracking these issues and recommends using the latest EAP versions of IntelliJ and the Grails plugin. See the [IntelliJ - Better IDE Support issue](https://github.com/apache/grails-core/issues/13910) for details and workarounds. Sometimes, invalidating caches and restarting IntelliJ can help. ### 5. General Upgrade Advice - Update all dependencies: Use only Grails 7-compatible plugins and dependencies. The group IDs have changed to org.apache.grails for core artifacts. See the [upgrade guide](https://grails.apache.org/docs/latest/guide/upgrading.html#upgrading60x) for details. - Java 17 baseline: Grails 7 requires Java 17 as the minimum version. - Groovy 4 baseline: Grails 7 uses Groovy 4.0.28. - Use the Grails BOM: Let the Grails Bill of Materials manage your dependency versions to avoid conflicts. - Compare with a fresh app: Generate a new Grails 7 app using [Grails Forge](https://start.grails.org) and compare your project structure and configuration to spot differences and required changes. - Plugin compatibility: All plugins must be Grails 7 compatible. Many plugins require updates due to the move to Apache and the Javax-to-Jakarta transition. ### 6. Where to Ask Questions Now that Grails is an Apache project, the best places to ask questions are: - [Grails GitHub Discussions](https://github.com/apache/grails-core/discussions) - [Grails Slack Community](https://grails-slack.cfapps.io/) - [Grails Users Mailing List](https://lists.apache.org/list.html?users@grails.apache.org) Stack Overflow is still used, but the above are more directly monitored by the core team and community. --- Summary: - Use correct static imports for constants. - Ensure you are using methods (matchAll(), match()) in the constructor, not as properties. - Clean and re-import your project in IntelliJ. - Use only Grails 7-compatible dependencies and plugins. - Refer to the [official upgrade guide](https://grails.apache.org/docs/latest/guide/upgrading.html#upgrading60x) for detailed steps. - For support, use GitHub Discussions, Slack, or the mailing list. If you continue to have issues with method/property resolution, it is likely an IDE indexing or dependency misconfiguration problem, especially given the known IntelliJ issues with Grails 7. Try the latest plugin, and if problems persist, report them on the [Grails GitHub issue tracker](https://github.com/apache/grails-core/issues) with a minimal reproducible example. --- References: - [Grails 7 Upgrade Guide](https://grails.apache.org/docs/latest/guide/upgrading.html#upgrading60x) - [IntelliJ IDE Support Issues](https://github.com/apache/grails-core/issues/13910) - [Interceptor API](https://grails.apache.org/docs/latest/api/grails/artefact/Interceptor.html) - [Grails 7 Release Announcement](https://grails.apache.org/blog/2025-10-18-introducing-grails-7.html)user
10/27/2025, 8:15 PMgrails create-interceptor command to create new interceptors that are correctly configured for Grails 7. This ensures that the necessary traits and methods, such as matchAll() and `request`/`response`, are properly applied. Additionally, if you encounter issues with matchAll() or other methods, you can explicitly define matching rules using the match() method with named arguments like controller, action, or uri. This approach is detailed in [Defining Interceptors](https://docs.grails.org/latest/guide/theWebLayer.html#definingInterceptors), and it allows for precise control over request matching without relying solely on matchAll(). For broader compatibility and to address potential dependency issues, ensure that your project uses the latest versions of Grails plugins and dependencies compatible with Grails 7. If you suspect IntelliJ or plugin-related issues, try clearing caches and re-importing the project to ensure proper resolution of Grails artifacts. This approach emphasizes regenerating interceptors and explicitly defining matching rules, which can help avoid reliance on potentially deprecated or misconfigured methods. Sources: - [Grails Interceptor documentation](https://docs.grails.org/latest/guide/theWebLayer.html#definingInterceptors) - [Defining Interceptors](https://docs.grails.org/latest/guide/theWebLayer.html#definingInterceptors)Mike Saubier
10/28/2025, 5:20 PMimplementation "org.apache.grails:grails-interceptors"