scope="prototype" sets the action in ssh to multiple instances

scope="prototype" sets the action in ssh to multiple examples, such as   

<bean name="accountActionBean" scope="prototype" class="xxx.action.AccountAction">

    <property name="accountService" ref="accountServiceImpl" />

  </bean>

......

In this way, a new action is guaranteed every time, avoiding continuous transmission of attribute values ​​in a single action, for example, the original user.addTime="2017-01-11 12:23:13"

If it is a single-column action, if user.addTime is not set in the jsp, after the page is submitted, the action will use the last saved attribute value, which is "2017-01-11 12:23:13", not a null value. This situation will not occur in multiple cases, but user.addTime=null. So generally set scope="prototype" 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326359707&siteId=291194637