所有用自己的spring文件的注意:
务必用以下方法来做,
头部使用方法1.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans default-lazy-init="false" default-dependency-check="none" default-autowire="no">
<!-- 系统管理 Action 一定要加上scope="request"这个属性.-->
<bean id="menu" class="com.doone.sys.menu.action.MenuAction" scope="request">
<property name="menuService" ref="menuService"></property>
</bean>
<beans>
方法2:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- 系统管理 Action 一定要加上scope="request"这个属性.-->
<bean id="menu" class="com.doone.sys.menu.action.MenuAction" scope="request">
<property name="menuService" ref="menuService"></property>
</beans>