This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch factory-class-documentation
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/factory-class-documentation by
this push:
new f924ff0c59 Update code block formatting in upgrade guide
f924ff0c59 is described below
commit f924ff0c5900e967112732d62563c95ee3500c7d
Author: James Fredley <[email protected]>
AuthorDate: Tue Sep 9 21:36:06 2025 -0400
Update code block formatting in upgrade guide
Replaces generic console code blocks with language-specific blocks (groovy,
yml) and adds file context for clarity in the upgrading60x.adoc documentation.
This improves readability and helps users better understand where to place
configuration and dependency snippets.
---
.../src/en/guide/upgrading/upgrading60x.adoc | 41 ++++++++++++++--------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/grails-doc/src/en/guide/upgrading/upgrading60x.adoc
b/grails-doc/src/en/guide/upgrading/upgrading60x.adoc
index 2d238d92b4..2d938df3c4 100644
--- a/grails-doc/src/en/guide/upgrading/upgrading60x.adoc
+++ b/grails-doc/src/en/guide/upgrading/upgrading60x.adoc
@@ -351,13 +351,17 @@ The asset pipeline has a new
https://github.com/wondrify/asset-pipeline[home]. V
Updated maven coordinates:
-```console
+[source,groovy]
+.build.gradle
+----
cloud.wondrify:asset-pipeline-gradle
cloud.wondrify:asset-pipeline-grails
-```
+----
Gradle plugin:
-```console
+[source,groovy]
+.build.gradle
+----
plugins {
id "cloud.wondrify.asset-pipeline"
}
@@ -365,7 +369,7 @@ plugins {
or
apply plugin: "cloud.wondrify.asset-pipeline"
-```
+----
===== 12.12 API Changes
@@ -383,9 +387,11 @@ If you decide to use the `grails-layout` plugin, several
changes have occurred:
Add the following dependency to your project:
-```console
+[source,groovy]
+.build.gradle
+----
implementation "org.apache.grails:grails-layout"
-```
+----
Package Changes:
@@ -421,9 +427,10 @@
https://docs.spring.io/spring-boot/appendix/application-properties/index.html#ap
The `servletContext` is no longer included by default in the generated
`Bootstrap` class. If you need access to the `servletContext`, you can inject
it into your `Bootstrap` class using:
-```console
+[source,groovy]
+----
ServletContext servletContext
-```
+----
===== 12.17 Development Reloading
@@ -439,7 +446,9 @@ To learn more about development reloading options, please
see the link:gettingSt
`org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory` is deprecated in
Hibernate 5.6 and is not compatible with
`org.hibernate:hibernate-core-jakarta:{hibernate5Version}`, which is used in
Grails 7.
-```console
+[source,yml]
+.application.yml
+----
hibernate:
allow_update_outside_transaction: true
cache:
@@ -448,13 +457,15 @@ To learn more about development reloading options, please
see the link:gettingSt
use_query_cache: false
region:
factory_class:
'org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory'
-```
+----
If your application sets `hibernate.cache.region.factory_class` to
`org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory` it will add the
`non-jakarta` version of `hibernate-core` to your classpath which will cause
`NoClassDefFoundError` and `ClassNotFoundException` errors.
You will need to change it to `jcache` and add the Ehcache dependency as
follows:
-```console
+[source,yml]
+.application.yml
+----
hibernate:
allow_update_outside_transaction: true
cache:
@@ -463,11 +474,13 @@ You will need to change it to `jcache` and add the
Ehcache dependency as follows
use_query_cache: false
region:
factory_class: 'jcache'
-```
+----
-```console
+[source,groovy]
+.build.gradle
+----
implementation 'org.ehcache:ehcache'
-```
+----
Alternatively, you can define the hibernate-ehcache dependency explicitly and
adjust it to exclude `hibernate-core` and add the
`jboss-transaction-api_1.3_spec` see
link:upgrading.html#_12_5_hibernate_ehcache[Hibernate-ehcache]