Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Plugin could not be enabled if using external config file #76

Open
robertoschwald opened this issue Apr 1, 2021 · 1 comment
Open

Comments

@robertoschwald
Copy link
Contributor

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.

@robertoschwald
Copy link
Contributor Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant