From 25a0169de7ae19f4f970cbf426c7765dc7910961 Mon Sep 17 00:00:00 2001 From: Mattias Reichel Date: Mon, 15 Jan 2024 04:58:41 +0100 Subject: [PATCH] fix: Change GORM reactor events config (#264) Gorm reactor events configuration changed in https://github.com/grails/grails-async/commit/229a888e03842cd82eba790225500992b28aa940. Both the config key and the default from true to false. --- .../org/grails/forge/feature/database/GormFeature.java | 4 +++- .../org/grails/forge/template/YamlTemplateSpec.groovy | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/grails-forge-core/src/main/java/org/grails/forge/feature/database/GormFeature.java b/grails-forge-core/src/main/java/org/grails/forge/feature/database/GormFeature.java index c5b16f91..d9e13193 100644 --- a/grails-forge-core/src/main/java/org/grails/forge/feature/database/GormFeature.java +++ b/grails-forge-core/src/main/java/org/grails/forge/feature/database/GormFeature.java @@ -38,6 +38,8 @@ protected boolean isGormReactorEventsEnabled() { } protected void applyDefaultGormConfig(Map config) { - config.put("grails.gorm.reactor.events", isGormReactorEventsEnabled()); + if (isGormReactorEventsEnabled()) { + config.put("grails.events.spring", true); + } } } diff --git a/grails-forge-core/src/test/groovy/org/grails/forge/template/YamlTemplateSpec.groovy b/grails-forge-core/src/test/groovy/org/grails/forge/template/YamlTemplateSpec.groovy index fea95e7a..3fbcf299 100644 --- a/grails-forge-core/src/test/groovy/org/grails/forge/template/YamlTemplateSpec.groovy +++ b/grails-forge-core/src/test/groovy/org/grails/forge/template/YamlTemplateSpec.groovy @@ -8,7 +8,7 @@ class YamlTemplateSpec extends Specification { Map config = [:] config.put("info.app.name", "foo") config.put("grails.codegen.defaultPackage", "example") - config.put("grails.gorm.reactor.events", false) + config.put("grails.events.spring", true) config.put("datasources.default.url", "dbURL") config.put("datasources.default.className", "h2") config.put("jpa.default.properties.hibernate.hbm2ddl", "auto") @@ -24,9 +24,8 @@ class YamlTemplateSpec extends Specification { grails: codegen: defaultPackage: example - gorm: - reactor: - events: false + events: + spring: true datasources: default: url: dbURL