Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update accessing config to use non-depricated methods #229

Open
ZenHarbinger opened this issue Mar 28, 2024 · 0 comments
Open

Update accessing config to use non-depricated methods #229

ZenHarbinger opened this issue Mar 28, 2024 · 0 comments

Comments

@ZenHarbinger
Copy link

Accessing config key '[auditLog]' through dot notation is deprecated, and it will be removed in a future release. Use 'config.getProperty(key, targetClass)' instead.

Update the ConfigObject accessor to be as follows:

    static ConfigObject getAuditConfig() {
        def grailsConfig = getApplication().config
        if (grailsConfig.containsProperty('auditLog')) {
            log.error "Your auditLog configuration settings use the old prefix 'auditLog' but must now use 'grails.plugin.auditLog'"
        }
        grailsConfig.getProperty('grails.plugin.auditLog', ConfigObject.class)
    }

Based on the spring security plugin:

https://github.com/grails/grails-spring-security-core/blob/8786567e45ed96b6ba891b611cf4cae26a79d30f/plugin/src/main/groovy/grails/plugin/springsecurity/ReflectionUtils.groovy#L114

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

No branches or pull requests

1 participant