我正在尝试从 grails 1.2.2 迁移到 1.3.6,并在尝试访问页面时收到以下错误:
Error creating bean with name 'com.example.domain.UserAccount': Requested bean is currently in creation: Is there an unresolvable circular reference?
似乎 grails 试图将 UserAccount 实例化为 spring bean(可能能够注入(inject)一些依赖项)。
grails 1.3.x 上是否有一些与 1.2.x 不相关的约束?
感谢和问候,
大卫。
最佳答案
问题来自 UserAccount 类中的一个属性:
Program program = new Program(user:this)
this 引用在构造结束之前从对象构造中转义。
关于grails-orm - 域对象上的“请求的 bean 当前正在创建中”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4554719/