我正在构建grails应用程序,并且尝试在其他服务中使服务无效时遇到问题。这两个服务都使用另一个定义的方法。
class fooService{
def barService
barService.doIt()
def getIt(){
...
}
}
class barService{
def fooService
fooService.getIt()
def doIt(){
...
}
}
Run Code Online (Sandbox Code Playgroud)
当我运行该应用程序并转到使用方法的位置时,它会引发此错误;
Error creating bean with name 'fooService':
org.springframework.beans.factory.FactoryBeanNotInitializedException: FactoryBean is
not fully initialized yet
Run Code Online (Sandbox Code Playgroud)
这是无法做到的事情吗?还是有人可以提供任何建议?
谢谢