【发布时间】:2016-02-11 06:44:33
【问题描述】:
我正在尝试添加审核日志插件,但当服务器启动时,我收到错误无法找到配置的审核日志域并且服务器关闭。
[ERROR] 2015-11-10 15:22:04,561 org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Can't find configured AuditLog domain: groovy.util.ConfigObject@5bb5d623
org.springframework.beans.factory.BeanCreationException:创建名为“org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController”的bean时出错:bean实例化失败;嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 bean 类 [org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]:构造函数抛出异常;嵌套异常是 java.lang.IllegalStateException:找不到配置的 AuditLog 域:groovy.util.ConfigObject@5bb5d623 在 java.util.concurrent.FutureTask.run(FutureTask.java:262) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 在 java.lang.Thread.run(Thread.java:745) 引起:org.springframework.beans.BeanInstantiationException:无法实例化bean类[org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]:构造函数抛出异常;嵌套异常是 java.lang.IllegalStateException:找不到配置的 AuditLog 域:groovy.util.ConfigObject@5bb5d623
这就是我在 buildconfig.groovy 中添加的方式
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
compile ":audit-logging:1.1.0-SNAPSHOT"
【问题讨论】: