---
title: "(转)spring配置数据源和hibernate的配置整合成一个文件"
author: "mib168"
date: "2010-11-25T11:44:29Z"
tags: ["Hibernate", "MySQL", "Spring", "XML", "配置管理"]
categories: ["企业架构"]
slug: "spring-hibernate"
draft: false
lastmod: "2010-11-25T11:44:29Z"
id: 824206
url: "https://mib168.iteye.com/blog/824206"
---

spring配置文件applicationContext-common.xml: \[code="xml"] com.mysql.jdbc.Driver jdbc:mysql://127.0.0.1/sshwithdbcp root root org.hibernate.dialect.MySQLDialect true classpath:com/max/model/\*.hbm.xml \[/code] web.xml文件: \[code="xml"] index.jsp contextConfigLocation /WEB-INF/applicationContext-\*.xml,classpath\*:applicationContext-\*.xml org.springframework.web.context.ContextLoaderListener action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 3 detail 3 0 action \*.do \[/code]