org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointsActivityController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pointsActivityServiceImpl' defined in file [D:\IdeaProjects\xxxx.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Need to invoke method 'autoChangeStatus' found on proxy for target class 'xxxxx' but cannot be delegated to target bean. Switch its visibility to package or protected.
![]()
将私有改为公开的即可解决

博客内容涉及Spring框架在创建Bean时遇到的问题,具体表现为BeanCreationException,原因在于尝试调用私有方法'autoChangeStatus',但无法在代理上进行委托。解决方案是将该方法的可见性改为包级或受保护的。这可能是由于代码设计或权限控制的错误导致。
2931

被折叠的 条评论
为什么被折叠?



