grails-console
grails-console copied to clipboard
Plugin could not be enabled if using external config file
If using external application.properties file via SPRING_CONFIG_ADDITIONAL_LOCATION env var, you cannot enable the plugin in non-dev environments.
Reason: ConsoleConfig gets the config map and checks if the enabled flag is of type Boolean. This does not work with external config files, as everything is String. Maybe it helps to rework the ConsoleConfig class to use config.getProperty("enabled", Boolean, false) and check that one.
In Grails 5.0.0, we get warnings regarding config access via dot notation. So maybe thats another reason to switch to config.getProperty(key, Class)
Accessing config through dot notation is deprecated, and it will be removed in a future release. Use 'config.getProperty(key, targetClass)' instead.