You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/guide/introduction/upgradeNotes.adoc
+48-5Lines changed: 48 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,16 @@
1
-
====Dependency Upgrades
1
+
=== Dependency Upgrades
2
2
3
-
GORM 2023.3 supports Apache Groovy 4 and Java 17 Hibernate 5.6.x and Spring 6.1.x.
3
+
GORM 2023.3 supports Apache Groovy 4 and Java 17, Hibernate 5.6.x and Spring 6.1.x.
4
4
5
5
Each of these underlying components may have changes that require altering your application. These changes are beyond the scope of this documentation.
6
6
7
-
====Default Autowire By Type inside GORM Data Services
7
+
=== Default Autowire By Type inside GORM Data Services
8
8
9
9
A GORM Service (or a bean) inside GORM DataService will default to autowire by-type, For example:
10
10
11
11
_./app/services/example/BookService.groovy_
12
-
```
12
+
[source,groovy]
13
+
----
13
14
package example
14
15
15
16
import grails.gorm.services.Service
@@ -25,6 +26,48 @@ abstract class BookService {
25
26
assert testRepo != null
26
27
}
27
28
}
28
-
```
29
+
----
29
30
30
31
Please note that with autowire by-type as the default, when multiple beans for same type are found the application with throw Exception. Use the Spring `@Qualifier` annotation for https://docs.spring.io/spring-framework/reference/6.1/core/beans/annotation-config/autowired-qualifiers.html[Fine-tuning Annotation Based Autowiring with Qualifiers].
32
+
33
+
=== JPA-annotated Entites are not supported
34
+
35
+
Support for using JPA-annotated entites written in Groovy has been added since GORM 6.1, but this feature has been removed since GORM 2023.0.
36
+
37
+
We want to keep GORM focusing on Groovy DSL, this allow developers to use JPA entities written in Java in the `app/domain`, so we can use Spring Data JPA or Micronaut Data JPA.
38
+
39
+
=== Initial support for Groovy 5
40
+
41
+
Groovy 5.0 is the next major version, it's currently in beta, but you can try it in the Grace applications.
42
+
43
+
=== Auto-Configure Hibernate Plugin
44
+
45
+
GORM 2023.1.0 introduced `HibernateGormAutoConfiguration` as a Spring Boot's https://docs.spring.io/spring-boot/3.3/reference/features/developing-auto-configuration.html[Auto-configuration], and the Hibernate plugin has also provides https://docs.spring.io/spring-boot/3.3/specification/configuration-metadata/index.html[Configuration Metadata].
46
+
47
+
Most importantly, you can now easily use GORM for Hibernate in your Spring Boot application.
GORM 2023.1.0 use `@GrailsComponentScan` to customize GORM `@Entity` scanning locations, just like Spring's link:{springjavadoc}/org/springframework/context/annotation/ComponentScan.html[`@ComponentScan`] does.
0 commit comments