我试图添加审计日志插件,但当服务器启动时,我收到错误,无法找到已配置的审计日志域,服务器关闭。
[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@5bb5d623org.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:找不到已配置的bean域: groovy.util.ConfigObject@5bb5d623位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)的java.util.concurrent.FutureTask.run(FutureTask.java:262),位于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
这就是我如何在my buildconfig.groovy中添加
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
compile ":audit-logging:1.1.0-SNAPSHOT"发布于 2015-11-11 01:09:08
如文档(http://plugins.grails.org/plugin/audit-logging)中所述,您必须执行
grails audit-quickstart your.package.YourAuditLogEvent>
在您的项目中创建审核日志域类,并在Config.groovy中配置该类。
顺便说一下: 1.1.0已经发布了。
https://stackoverflow.com/questions/33629150
复制相似问题