diff --git a/build.gradle b/build.gradle index 7783be71..88dd5818 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,15 @@ allprojects { details.useVersion(micronautVersion) } } + + resolutionStrategy.dependencySubstitution { + + //update fields plugin used by scaffolding + substitute(module("org.grails.plugins:fields:3.0.0.RC1")).using(module("io.github.gpc:fields:5.0.3")) + } } + + } subprojects { Project subproject -> diff --git a/examples/test-data-service/build.gradle b/examples/test-data-service/build.gradle index 4968d620..3edb6f45 100644 --- a/examples/test-data-service/build.gradle +++ b/examples/test-data-service/build.gradle @@ -12,8 +12,6 @@ apply plugin: "java" dependencies { profile "org.grails.profiles:rest-api" - compileOnly "org.grails.plugins:views-json:$grailsViewsVersion" - compileOnly "org.grails.plugins:views-json-templates:$grailsViewsVersion" implementation "org.springframework.boot:spring-boot-starter-logging" implementation "org.springframework.boot:spring-boot-autoconfigure" implementation "org.grails:grails-core:$grailsVersion" @@ -31,8 +29,8 @@ dependencies { implementation "org.grails.plugins:events" implementation project(":grails-plugin") implementation "org.mongodb:mongodb-driver-sync:$mongodbDriverVersion" - implementation "org.grails.plugins:views-json" - implementation "org.grails.plugins:views-json-templates" + implementation "org.grails.plugins:views-json:$grailsViewsVersion" + implementation "org.grails.plugins:views-json-templates:$grailsViewsVersion" implementation 'org.grails.plugins:spring-security-core:4.0.3' implementation 'org.grails.plugins:spring-security-rest:3.0.1' testImplementation "org.grails:grails-gorm-testing-support:$testingSupportVersion" diff --git a/gradle.properties b/gradle.properties index 999cdc06..8b19e18f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -assetPipelineVersion=4.5.1 +assetPipelineVersion=5.0.1 caffeineVersion=2.9.3 datastoreVersion=9.0.0-SNAPSHOT gebVersion=7.0 @@ -6,7 +6,7 @@ gebPluginVersion=4.0.0 gormVersion=9.0.0-SNAPSHOT grailsGradlePluginVersion=7.0.0-SNAPSHOT grailsShellVersion=7.0.0-SNAPSHOT -grailsViewsVersion=3.2.3 +grailsViewsVersion=4.0.0-SNAPSHOT groovyVersion=4.0.22 h2Version=1.4.200 hibernateCoreVersion=5.6.15.Final @@ -41,7 +41,7 @@ nettyVersion=4.1.112.Final fieldsVersion=5.0.3 grailsVersion=7.0.0-SNAPSHOT micrometer.version=1.8.0 -scaffoldingVersion=5.0.1 +scaffoldingVersion=6.0.0-SNAPSHOT testingSupportVersion=4.0.0-SNAPSHOT org.gradle.caching=true org.gradle.parallel=false diff --git a/grails-datastore-gorm-mongodb/build.gradle b/grails-datastore-gorm-mongodb/build.gradle index f27065f0..d228c635 100644 --- a/grails-datastore-gorm-mongodb/build.gradle +++ b/grails-datastore-gorm-mongodb/build.gradle @@ -6,6 +6,7 @@ dependencies { api "org.grails:grails-datastore-gorm:$datastoreVersion" api project(":grails-datastore-gorm-bson") + implementation "org.grails:grails-core:$grailsVersion" implementation "com.github.ben-manes.caffeine:caffeine:$caffeineVersion" compileOnly "org.grails:grails-datastore-gorm-support:$datastoreVersion", { diff --git a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/MongoDatastore.java b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/MongoDatastore.java index 2f7b0fd9..ac879ee3 100644 --- a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/MongoDatastore.java +++ b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/MongoDatastore.java @@ -21,6 +21,7 @@ import com.mongodb.client.MongoIterable; import com.mongodb.client.model.IndexOptions; import grails.gorm.multitenancy.Tenants; +import grails.util.GrailsMessageSourceUtils; import groovy.lang.Closure; import org.bson.Document; import org.bson.codecs.Codec; @@ -65,9 +66,11 @@ import org.grails.datastore.mapping.transactions.DatastoreTransactionManager; import org.grails.datastore.mapping.transactions.TransactionCapableDatastore; import org.grails.datastore.mapping.validation.ValidatorRegistry; +import org.grails.spring.context.support.PluginAwareResourceBundleMessageSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.MessageSource; +import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.context.support.StaticMessageSource; import org.springframework.core.env.PropertyResolver; import org.springframework.transaction.PlatformTransactionManager; @@ -575,10 +578,14 @@ public void setCodecs(List> codecs) { /** * The message source used for validation messages * - * @param messageSource The message source + * @param messageSources The message source */ @Autowired(required = false) - public void setMessageSource(@Qualifier("PluginAwareResourceBundleMessageSource") MessageSource messageSource) { + public void setMessageSource(List messageSources) { + setMessageSource(GrailsMessageSourceUtils.findPreferredMessageSource(messageSources)); + } + + public void setMessageSource(MessageSource messageSource) { if(messageSource != null) { configureValidatorRegistry(connectionSources.getDefaultConnectionSource().getSettings(), (MongoMappingContext) mappingContext, messageSource); }