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

fix config read in Grails 4 #233

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
*/
package grails.plugins.orm.auditable

import grails.config.Config
import grails.core.GrailsApplication
import grails.util.Holders
import groovy.util.logging.Slf4j
import org.grails.config.NavigableMap
import org.grails.config.PropertySourcesConfig
import org.springframework.core.env.MapPropertySource
import org.springframework.core.env.PropertySource

/**
* Helper methods that use dynamic Groovy
*/
Expand Down Expand Up @@ -56,11 +57,11 @@ class ReflectionUtils {
}

static ConfigObject getAuditConfig() {
def grailsConfig = getApplication().config
if (grailsConfig.containsProperty('auditLog')) {
Config grailsConfig = getApplication().config
if (grailsConfig.getProperty('auditLog', NavigableMap)) {
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)
grailsConfig.getProperty("grails.plugin.auditLog", NavigableMap) as ConfigObject
}

static void setAuditConfig(ConfigObject c) {
Expand Down
Loading