后台常见报错处理

Posted 古兰精

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了后台常见报错处理相关的知识,希望对你有一定的参考价值。

1、接口注入问题:

@Controller
@Scope("prototype")
public class GenuineManagementAction extends BaseAction {

    private static final long serialVersionUID = -3797612994929924322L;

    @Resource
    private GenuineManagementService genuineManagementService;
    @Resource//这样写是有问题的,去掉即可正常
    private GenuineManagement genuineManagement;

}
  @Resource代表注入,只有接口才能注入,而GenuineManagement 是一个实体类,所以加上@Resource 会报如下错误:
Unable to instantiate Action, genuineManagementAction, 
No matching bean of type [com.vrv.paw.domain.GenuineManagement] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.
Unable to instantiate Action, genuineManagementAction,  defined for genuineManagementAction_listUI in namespace /Error creating bean with name genuineManagementAction: Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.vrv.paw.domain.GenuineManagement] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(mappedName=, shareable=true, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER, lookup=)} - action - file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp4/wtpwebapps/JJFX/WEB-INF/classes/struts-extend.xml:420:89
    at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:318)

2、

以上是关于后台常见报错处理的主要内容,如果未能解决你的问题,请参考以下文章

ssh远程主机 常见报错处理

常见报错

python常见报错信息!错误和异常!附带处理方法

linux 安装mysql8.0及常见报错处理

Tensorflow常见报错处理

JVM-Sandbox常见报错