java web中常用的一些配置文件的信息

来源:互联网 发布:淘宝怎么修改地址手机 编辑:程序博客网 时间:2024/06/05 12:06
实体映射文件xx.hbm.xml<?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"><hibernate-mapping></hibernate-mapping>struts配置文件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></struts>hibernate的映射文件hibernate.cfg.xml<!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><hibernate-configuration><session-factory></session-factory></hibernate-configuration>Spring的映射文件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:context="http://www.springframework.org/schema/context"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.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"></beans>数据库连接信息db.propertiesjdbcUrl = jdbc:mysql://localhost:3306/itcastoa_20110908driverClass = com.mysql.jdbc.Driverusername = rootpassword =root在hibernate.cfg.xml中要配置数据库的其他信息org.hibernate.dialect.MySQL5Dialecttrueupdate

原创粉丝点击