SSH 入门例子

struts1.2.9+spring2.0.6+hibernate3.0.5 整合开发的一个例子

一个小例子,看看struts1.2.9+spring2.0.6+hibernate3.0.5 是如何整合在一起进行javaweb开发的


一个简单的OA小系统,下面是预览图和项目结构





 

 

这个SSH整合的例子,用到了许多经典的整合技巧,能帮助初学者清晰的理解整合的步骤和技巧,我们也可以使用这个框架为模版,来搭建自己SSH的环境。


首先我列出关键的整合步骤


1.建立WEB项目的目录结构

   a.strtus的 ActionServlet 配置在web.xml 中

   b.将spring的监听器 配置在web.xml

   c.字符乱码过滤器 配置在web.xml

Java代码 复制代码
  1. <?xml version= "1.0"  encoding= "UTF-8" ?>   
  2. <web-app xmlns= "http://java.sun.com/xml/ns/j2ee"   
  3.     xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"  version= "2.4"   
  4.     xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >   
  5.   
  6.     <context-param>   
  7.         <param-name>contextConfigLocation</param-name>   
  8.         <param-value>/WEB-INF/applicationContext.xml</param-value>   
  9.     </context-param>   
  10.     <listener>   
  11.         <listener- class >   
  12.             org.springframework.web.context.ContextLoaderListener   
  13.         </listener- class >   
  14.     </listener>   
  15.   
  16.     <filter>   
  17.         <filter-name>Set Character Encoding</filter-name>   
  18.         <filter- class >   
  19.             org.springframework.web.filter.CharacterEncodingFilter   
  20.         </filter- class >   
  21.         <init-param>   
  22.             <param-name>encoding</param-name>   
  23.             <param-value>UTF- 8 </param-value>   
  24.         </init-param>   
  25.     </filter>   
  26.     <filter>   
  27.         <filter-name>sitemesh</filter-name>   
  28.         <filter- class >   
  29.             com.opensymphony.module.sitemesh.filter.PageFilter   
  30.         </filter- class >   
  31.     </filter>   
  32.   
  33.     <filter-mapping>   
  34.         <filter-name>sitemesh</filter-name>   
  35.         <url-pattern>/*</url-pattern>   
  36.     </filter-mapping>   
  37.     <filter-mapping>   
  38.         <filter-name>Set Character Encoding</filter-name>   
  39.         <url-pattern>/*</url-pattern>   
  40.     </filter-mapping>   
  41.   
  42.     <servlet>   
  43.         <servlet-name>action</servlet-name>   
  44.         <servlet- class >   
  45.             org.apache.struts.action.ActionServlet   
  46.         </servlet- class >   
  47.         <init-param>   
  48.             <param-name>config</param-name>   
  49.             <param-value>/WEB-INF/struts-config.xml</param-value>   
  50.         </init-param>   
  51.         <init-param>   
  52.             <param-name>debug</param-name>   
  53.             <param-value> 3 </param-value>   
  54.         </init-param>   
  55.         <init-param>   
  56.             <param-name>detail</param-name>   
  57.             <param-value> 3 </param-value>   
  58.         </init-param>   
  59.         <load-on-startup> 0 </load-on-startup>   
  60.     </servlet>   
  61.     <servlet-mapping>   
  62.         <servlet-name>action</servlet-name>   
  63.         <url-pattern>*. do </url-pattern>   
  64.     </servlet-mapping>   
  65.     <session-config>   
  66.         <session-timeout> 120 </session-timeout>   
  67.     </session-config>   
  68.   
  69.     <!-- The Usual Welcome File List -->   
  70.     <welcome-file-list>   
  71.         <welcome-file>index. do </welcome-file>   
  72.     </welcome-file-list>   
  73.     <jsp-config>   
  74.         <taglib>   
  75.             <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>   
  76.             <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>   
  77.         </taglib>   
  78.         <taglib>   
  79.             <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>   
  80.             <taglib-location>/WEB-INF/struts-html.tld</taglib-location>   
  81.         </taglib>   
  82.         <taglib>   
  83.             <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>   
  84.             <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>   
  85.         </taglib>   
  86.         <taglib>   
  87.             <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>   
  88.             <taglib-location>   
  89.                 /WEB-INF/struts-nested.tld   
  90.             </taglib-location>   
  91.         </taglib>   
  92.         <taglib>   
  93.             <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>   
  94.             <taglib-location>   
  95.                 /WEB-INF/struts-template.tld   
  96.             </taglib-location>   
  97.         </taglib>   
  98.         <taglib>   
  99.             <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>   
  100.             <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>   
  101.         </taglib>   
  102.   
  103.         <taglib>   
  104.             <taglib-uri>sitemesh-page</taglib-uri>   
  105.             <taglib-location>   
  106.                 /WEB-INF/sitemesh-page.tld   
  107.             </taglib-location>   
  108.         </taglib>   
  109.   
  110.         <taglib>   
  111.             <taglib-uri>sitemesh-decorator</taglib-uri>   
  112.             <taglib-location>   
  113.                 /WEB-INF/sitemesh-decorator.tld   
  114.             </taglib-location>   
  115.         </taglib>   
  116.     </jsp-config>   
  117.     <welcome-file-list>   
  118.         <welcome-file>login.jsp</welcome-file>   
  119.     </welcome-file-list>   
  120. </web-app>  
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext.xml</param-value>
	</context-param>
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>

	<filter>
		<filter-name>Set Character Encoding</filter-name>
		<filter-class>
			org.springframework.web.filter.CharacterEncodingFilter
		</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>sitemesh</filter-name>
		<filter-class>
			com.opensymphony.module.sitemesh.filter.PageFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>sitemesh</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Set Character Encoding</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<servlet>
		<servlet-name>action</servlet-name>
		<servlet-class>
			org.apache.struts.action.ActionServlet
		</servlet-class>
		<init-param>
			<param-name>config</param-name>
			<param-value>/WEB-INF/struts-config.xml</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>3</param-value>
		</init-param>
		<init-param>
			<param-name>detail</param-name>
			<param-value>3</param-value>
		</init-param>
		<load-on-startup>0</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>action</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
	<session-config>
		<session-timeout>120</session-timeout>
	</session-config>

	<!-- The Usual Welcome File List -->
	<welcome-file-list>
		<welcome-file>index.do</welcome-file>
	</welcome-file-list>
	<jsp-config>
		<taglib>
			<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
			<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
			<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
			<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/struts-nested.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
			<taglib-location>
				/WEB-INF/struts-template.tld
			</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
			<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
		</taglib>

		<taglib>
			<taglib-uri>sitemesh-page</taglib-uri>
			<taglib-location>
				/WEB-INF/sitemesh-page.tld
			</taglib-location>
		</taglib>

		<taglib>
			<taglib-uri>sitemesh-decorator</taglib-uri>
			<taglib-location>
				/WEB-INF/sitemesh-decorator.tld
			</taglib-location>
		</taglib>
	</jsp-config>
	<welcome-file-list>
		<welcome-file>login.jsp</welcome-file>
	</welcome-file-list>
</web-app>

 

 

2.编写spring的配置文件 applicationContext.xml

 

  a. 配置数据源

  b.让spring来管理SessionFactory

  c.配置事务

  d.配置Hibernate 属性以及映射文件

  e.定义DAO和DAO代理

  f.根据需要配置AOP

  g.定义struts的配置

 

Java代码 复制代码
  1. <?xml version= "1.0"  encoding= "UTF-8" ?>   
  2. <!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN"   
  3. "http://www.springframework.org/dtd/spring-beans-2.0.dtd" >   
  4. <beans>   
  5.   
  6.   
  7.     <!--  配置数据源 -->   
  8.     <bean id= "dataSource"   
  9.          class = "org.apache.commons.dbcp.BasicDataSource"   
  10.         destroy-method= "close" >   
  11.         <property name= "driverClassName" >   
  12.             <value>com.mysql.jdbc.Driver</value>   
  13.         </property>   
  14.         <property name= "url" >   
  15.             <value>jdbc:mysql: //localhost:3306/demo?useUnicode=true&amp;characterEncoding=utf-8</value>   
  16.         </property>   
  17.         <property name= "username" >   
  18.             <value>root</value>   
  19.         </property>   
  20.         <property name= "password" >   
  21.             <value> 12345678 </value>   
  22.         </property>   
  23.     </bean>   
  24.   
  25.   
  26.     <!-- 配置Hibernate -->   
  27.     <bean id= "sessionFactory"   
  28.          class = "org.springframework.orm.hibernate3.LocalSessionFactoryBean" >   
  29.         <property name= "dataSource" >   
  30.             <ref local= "dataSource"  />   
  31.         </property>   
  32.         <property name= "mappingResources" >   
  33.             <list>   
  34.                 <value>com/demo/hibernate/beans/User.hbm.xml</value>   
  35.                 <value>com/demo/hibernate/beans/Address.hbm.xml</value>   
  36.                 <value>com/demo/hibernate/beans/Schedule.hbm.xml</value>   
  37.                 <value>com/demo/hibernate/beans/Worklog.hbm.xml</value>   
  38.                 <value>com/demo/hibernate/beans/Sms.hbm.xml</value>   
  39.                 <value>com/demo/hibernate/beans/Notice.hbm.xml</value>   
  40.                 <value>com/demo/hibernate/beans/Meeting.hbm.xml</value>   
  41.             </list>   
  42.         </property>   
  43.         <property name= "hibernateProperties" >   
  44.             <props>   
  45.                 <prop key= "hibernate.dialect" >   
  46.                     org.hibernate.dialect.MySQLDialect   
  47.                 </prop>   
  48.                 <prop key= "hibernate.show_sql" > true </prop>   
  49.                 <prop key= "hibernate.hbm2ddl.auto" >update</prop>   
  50.             </props>   
  51.         </property>   
  52.     </bean>   
  53.   
  54.   
  55.     <!-- 配置事务 -->   
  56.     <bean id= "transactionManager"   
  57.          class = "org.springframework.orm.hibernate3.HibernateTransactionManager" >   
  58.         <property name= "sessionFactory" >   
  59.             <ref local= "sessionFactory"  />   
  60.         </property>   
  61.     </bean>   
  62.   
  63.   
  64.     <!-- 定义DAO -->   
  65.     <bean id= "userDAO"   class = "com.demo.hibernate.dao.UserDAO" >   
  66.         <property name= "sessionFactory" >   
  67.             <ref local= "sessionFactory"  />   
  68.         </property>   
  69.     </bean>   
  70.     <bean id= "addressDAO"   class = "com.demo.hibernate.dao.AddressDAO" >   
  71.         <property name= "sessionFactory" >   
  72.             <ref local= "sessionFactory"  />   
  73.         </property>   
  74.     </bean>   
  75.     <bean id= "scheduleDAO"   class = "com.demo.hibernate.dao.ScheduleDAO" >   
  76.         <property name= "sessionFactory" >   
  77.             <ref local= "sessionFactory"  />   
  78.         </property>   
  79.     </bean>   
  80.     <bean id= "worklogDAO"   class = "com.demo.hibernate.dao.WorklogDAO" >   
  81.         <property name= "sessionFactory" >   
  82.             <ref local= "sessionFactory"  />   
  83.         </property>   
  84.     </bean>   
  85.     <bean id= "smsDAO"   class = "com.demo.hibernate.dao.SmsDAO" >   
  86.         <property name= "sessionFactory" >   
  87.             <ref local= "sessionFactory"  />   
  88.         </property>   
  89.     </bean>   
  90.     <bean id= "noticeDAO"   class = "com.demo.hibernate.dao.NoticeDAO" >   
  91.         <property name= "sessionFactory" >   
  92.             <ref local= "sessionFactory"  />   
  93.         </property>   
  94.     </bean>   
  95.     <bean id= "meetingDAO"   class = "com.demo.hibernate.dao.MeetingDAO" >   
  96.         <property name= "sessionFactory" >   
  97.             <ref local= "sessionFactory"  />   
  98.         </property>   
  99.     </bean>   
  100.   
  101.   
  102.     <!-- 定义DAO代理 -->   
  103.     <bean id= "UserDAOProxy"   
  104.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  105.         <property name= "transactionManager" >   
  106.             <ref bean= "transactionManager"  />   
  107.         </property>   
  108.         <property name= "target" >   
  109.             <ref local= "userDAO"  />   
  110.         </property>   
  111.         <property name= "transactionAttributes" >   
  112.             <props>   
  113.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  114.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  115.             </props>   
  116.         </property>   
  117.     </bean>   
  118.     <bean id= "addressDAOProxy"   
  119.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  120.         <property name= "transactionManager" >   
  121.             <ref bean= "transactionManager"  />   
  122.         </property>   
  123.         <property name= "target" >   
  124.             <ref local= "addressDAO"  />   
  125.         </property>   
  126.         <property name= "transactionAttributes" >   
  127.             <props>   
  128.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  129.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  130.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  131.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  132.             </props>   
  133.         </property>   
  134.     </bean>   
  135.     <bean id= "scheduleDAOProxy"   
  136.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  137.         <property name= "transactionManager" >   
  138.             <ref bean= "transactionManager"  />   
  139.         </property>   
  140.         <property name= "target" >   
  141.             <ref local= "scheduleDAO"  />   
  142.         </property>   
  143.         <property name= "transactionAttributes" >   
  144.             <props>   
  145.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  146.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  147.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  148.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  149.             </props>   
  150.         </property>   
  151.     </bean>   
  152.     <bean id= "worklogDAOProxy"   
  153.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  154.         <property name= "transactionManager" >   
  155.             <ref bean= "transactionManager"  />   
  156.         </property>   
  157.         <property name= "target" >   
  158.             <ref local= "worklogDAO"  />   
  159.         </property>   
  160.         <property name= "transactionAttributes" >   
  161.             <props>   
  162.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  163.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  164.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  165.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  166.             </props>   
  167.         </property>   
  168.     </bean>   
  169.     <bean id= "smsDAOProxy"   
  170.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  171.         <property name= "transactionManager" >   
  172.             <ref bean= "transactionManager"  />   
  173.         </property>   
  174.         <property name= "target" >   
  175.             <ref local= "smsDAO"  />   
  176.         </property>   
  177.         <property name= "transactionAttributes" >   
  178.             <props>   
  179.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  180.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  181.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  182.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  183.             </props>   
  184.         </property>   
  185.     </bean>   
  186.     <bean id= "noticeDAOProxy"   
  187.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  188.         <property name= "transactionManager" >   
  189.             <ref bean= "transactionManager"  />   
  190.         </property>   
  191.         <property name= "target" >   
  192.             <ref local= "noticeDAO"  />   
  193.         </property>   
  194.         <property name= "transactionAttributes" >   
  195.             <props>   
  196.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  197.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  198.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  199.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  200.             </props>   
  201.         </property>   
  202.     </bean>   
  203.     <bean id= "meetingDAOProxy"   
  204.          class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean" >   
  205.         <property name= "transactionManager" >   
  206.             <ref bean= "transactionManager"  />   
  207.         </property>   
  208.         <property name= "target" >   
  209.             <ref local= "meetingDAO"  />   
  210.         </property>   
  211.         <property name= "transactionAttributes" >   
  212.             <props>   
  213.                 <prop key= "insert*" >PROPAGATION_REQUIRED</prop>   
  214.                 <prop key= "update*" >PROPAGATION_REQUIRED</prop>   
  215.                 <prop key= "delete*" >PROPAGATION_REQUIRED</prop>   
  216.                 <prop key= "*" >PROPAGATION_REQUIRED,readOnly</prop>   
  217.             </props>   
  218.         </property>   
  219.     </bean>   
  220.   
  221.   
  222.     <!-- 定义Struts配置 -->   
  223.     <bean name= "/login"   class = "com.demo.struts.actions.LoginAction" >   
  224.         <property name= "userDAO" >   
  225.             <ref local= "userDAO"  />   
  226.         </property>   
  227.     </bean>   
  228.     <bean name= "/logout"   class = "com.demo.struts.actions.LogoutAction" >   
  229.         <property name= "userDAO" >   
  230.             <ref local= "userDAO"  />   
  231.         </property>   
  232.     </bean>   
  233.     <bean name= "/register"   
  234.          class = "com.demo.struts.actions.RegisterAction" >   
  235.         <property name= "userDAO" >   
  236.             <ref local= "userDAO"  />   
  237.         </property>   
  238.     </bean>   
  239.   
  240.     <!-- 定义Struts配置:address -->   
  241.     <bean name= "/address"   
  242.          class = "com.demo.struts.actions.AddressAction" >   
  243.         <property name= "addressDAO" >   
  244.             <ref local= "addressDAO"  />   
  245.         </property>   
  246.     </bean>   
  247.     <bean name= "/address_add"   
  248.          class = "com.demo.struts.actions.AddressAction" >   
  249.         <property name= "addressDAO" >   
  250.             <ref local= "addressDAO"  />   
  251.         </property>   
  252.     </bean>   
  253.     <bean name= "/address_edit"   
  254.          class = "com.demo.struts.actions.AddressAction" >   
  255.         <property name= "addressDAO" >   
  256.             <ref local= "addressDAO"  />   
  257.         </property>   
  258.     </bean>   
  259.   
  260.   
  261.     <!-- 定义Struts配置:schedule -->   
  262.     <bean name= "/schedule"   
  263.          class = "com.demo.struts.actions.ScheduleAction" >   
  264.         <property name= "scheduleDAO" >   
  265.             <ref local= "scheduleDAO"  />   
  266.         </property>   
  267.     </bean>   
  268.     <bean name= "/schedule_add"   
  269.          class = "com.demo.struts.actions.ScheduleAction" >   
  270.         <property name= "scheduleDAO" >   
  271.             <ref local= "scheduleDAO"  />   
  272.         </property>   
  273.     </bean>   
  274.     <bean name= "/schedule_edit"   
  275.          class = "com.demo.struts.actions.ScheduleAction" >   
  276.         <property name= "scheduleDAO" >   
  277.             <ref local= "scheduleDAO"  />   
  278.         </property>   
  279.     </bean>   
  280.   
  281.     <!-- 定义Struts配置:worklog -->   
  282.     <bean name= "/worklog"   
  283.          class = "com.demo.struts.actions.WorklogAction" >   
  284.         <property name= "worklogDAO" >   
  285.             <ref local= "worklogDAO"  />   
  286.         </property>   
  287.     </bean>   
  288.     <bean name= "/worklog_add"   
  289.          class = "com.demo.struts.actions.WorklogAction" >   
  290.         <property name= "worklogDAO" >   
  291.             <ref local= "worklogDAO"  />   
  292.         </property>   
  293.     </bean>   
  294.     <bean name= "/worklog_edit"   
  295.          class = "com.demo.struts.actions.WorklogAction" >   
  296.         <property name= "worklogDAO" >   
  297.             <ref local= "worklogDAO"  />   
  298.         </property>   
  299.     </bean>   
  300.   
  301.     <!-- 定义Struts配置:sms -->   
  302.     <bean name= "/sms"   class = "com.demo.struts.actions.SmsAction" >   
  303.         <property name= "smsDAO" >   
  304.             <ref local= "smsDAO"  />   
  305.         </property>   
  306.     </bean>   
  307.     <bean name= "/sms_add"   class = "com.demo.struts.actions.SmsAction" >   
  308.         <property name= "smsDAO" >   
  309.             <ref local= "smsDAO"  />   
  310.         </property>   
  311.     </bean>   
  312.   
  313.     <!-- 定义Struts配置:notice -->   
  314.     <bean name= "/notice"   class = "com.demo.struts.actions.NoticeAction" >   
  315.         <property name= "noticeDAO" >   
  316.             <ref local= "noticeDAO"  />   
  317.         </property>   
  318.     </bean>   
  319.     <bean name= "/notice_add"   
  320.          class = "com.demo.struts.actions.NoticeAction" >   
  321.         <property name= "noticeDAO" >   
  322.             <ref local= "noticeDAO"  />   
  323.         </property>   
  324.     </bean>   
  325.     <bean name= "/notice_edit"   
  326.          class = "com.demo.struts.actions.NoticeAction" >   
  327.         <property name= "noticeDAO" >   
  328.             <ref local= "noticeDAO"  />   
  329.         </property>   
  330.     </bean>   
  331.   
  332.     <!-- 定义Struts配置:meeting -->   
  333.     <bean name= "/meeting"   
  334.          class = "com.demo.struts.actions.MeetingAction" >   
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值