常用的配置文件-SSH-2
来源:互联网 发布:拼多多提现网络繁忙 编辑:程序博客网 时间:2024/06/14 00:10
web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list></web-app>
struts.xml
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constant name="struts.objectFactory" value="spring" /> <package name="default" namespace="/" extends="struts-default"> <action name="userAction" class="userAction" > <result name="success"></result> </action> </package></struts>
applicationContext.xml
<?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:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"> </property> <property name="url" value="jdbc:mysql://192.168.199.153:3306/hibernate"></property> <property name="username" value="root"></property> <property name="password" value="root"></property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><property name="dataSource" ref="dataSource" ></property><property name="hibernateProperties" ><props><prop key="hibernate.dialect" >org.hibernate.dialect.MySQLDialect</prop><prop key="hibernate.hbm2ddl.auto">update</prop><prop key="hibernate.show_sql">true</prop></props></property><property name="mappingResources"> <list> <value>com/snow/po/User.hbm.xml</value> </list> </property></bean><bean id="userDao" class="com.snow.dao.impl.UserDaoImpl" ><property name="factory" ref="sessionFactory" ></property></bean><bean id="userAction" class="com.snow.action.UserAction" scope="prototype" ><property name="userDao" ref="userDao" ></property></bean></beans>如果将对象交给ICO管理。慎用new
- 常用的配置文件-SSH-2
- 常用的配置文件-SSH-1
- 常用的配置文件-SSH-3
- ssh的配置文件(2)
- 【配置文件】SSH配置文件-2
- SSH整合的配置文件
- SSH的各种配置文件
- SSH的配置文件
- ssh配置文件的步骤
- SSH整合的配置文件
- 学习笔记--ssh的配置文件
- SSH相关配置文件的修改
- compass+SSH 的spring配置文件
- SSH下的Spring配置文件
- SSH+MVC的配置文件详解
- 整合ssh框架的配置文件
- 框架SSH整合的配置文件
- SSH的配置文件(1)
- vijos P1033 整数分解(版本2)
- Entity Framewrok实体框架 第一天
- jsp声明
- 秒杀多线程第4篇 一个经典的多线程同步问题
- computer science 经典书籍及书评
- 常用的配置文件-SSH-2
- 微软WinRT开发人员的一些解答
- non-power-of-two (NPOT) textures
- mysql读事务的隔离级别
- 100 or so Books that shaped a Century of Science
- oracle查询员工人数最少的部门
- gvim中设置字体
- 半期小记
- printf函数的盲点