Closed Alice52 closed 2 years ago
java.lang.IllegalStateException: Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available.
I really saw proxy-object property of exposeProxy is false but i donot when and how to change it to true.
public class TestServiceImpl implements ITestService {
// advice to use AopContext.currentProxy(): but still get error
@Resource private ITestService testService;
}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'testServiceImpl': Bean with name 'testServiceImpl' has been injected into other beans [testServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'testServiceImpl': Bean with name 'testServiceImpl' has been injected into other beans [testServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
exposeProxy
reference