如果
com.project.action.PasswordHintAction使用构造型注释进行注释,请使用下面给出的组件扫描
<context:component-scan base-package="com.project.action"/>
编辑
我看到了您的问题,因为
PasswordHintActionTest您正在自动接线
PasswordHintAction。但是您没有创建用于
PasswordHintAction自动装配的bean配置。添加注释的刻板印象中的一个(
@Component,@Service, @Controller)到
PasswordHintAction喜欢
@Componentpublic class PasswordHintAction extends baseAction { private static final long serialVersionUID = -4037514607101222025L; private String username;或以
applicationcontext.xml类似方式创建xml配置
<bean id="passwordHintAction" />



