Skip to content

Unable to load application.groovy while running bootRun target #14086

@weinellucian

Description

@weinellucian

Expected Behavior

We are seeing issue while starting the Grails App using bootRun, our Application do have lot of configuration specified in grails-app/conf/application.groovy one such configuration is grails.config.locations as shown below, the configuration files have App specific and DB configurations.
During App startup we see issue loading application.groovy resulting in Application not coming up.

application.groovy
grails.config.locations = [
        XYZ_DB_CONFIG:  "XYZ_configuration.groovy",
        XYZ_APP_CONFIG: "XYZApp_configuration.groovy"
]

Analysis:

After debugging the Grails codebase we do see issue in grails-core where the class GroovyConfigPropertySourceLoader.groovy responsible for loading the configurations is using deprecated class NavigableMap , in GroovyConfigPropertySourceLoader.load() method in this method we see the following happening

  1. groovy.util.ConfigObject is been constructed from ConfigSlurper using application.groovy wich has all the configurations specified in application.groovy
  2. Further NavigableMap.merge(configObject, false) seems to be not working i.e. we see empty NavigableMap as shown in the debug snapshot

Image

Actual Behaviour

No response

Steps To Reproduce

No response

Environment Information

Windows 11 Pro
grails-7.0.0-M1
JDK 17

Example Application

No response

Version

grails-7.0.0-M1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions