0

我在 BootStrap.groovy 的 init 闭包中有以下代码

private def setupDefaultAdmin = {

        log.info "Adding default user to system"

        // create the super user/admin account

        if (SentryUser.findAllByUsername("test@test.org") == null) {
        def admin = new SentryUser(username: "test@test.org",password: 'password',
                enabled: true).save(failOnError: true)

        admin = new SentryUser(username: "admin@test.org",password: 'password',
                enabled: true).save(failOnError: true)
        }

    }

当我将此应用程序部署到 JBOSS 容器 7.1 版时,我在部署时不断进入无限循环。我的数据库配置如下

production {
        dataSource {
            dbCreate = "update"
            url = "jdbc:h2:mem:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000"
            }
        }
4

1 回答 1

0

该问题与 grails.logging.jul.usebridge = true 有关

所以请记住,如果您在 JBOSS 上看到任何异常并在 prod 中打开此设置,则可能会导致问题。

于 2012-10-31T20:23:31.793 回答