Chinaunix
标题:
详解Spring的配置文件
[打印本页]
作者:
mapu147
时间:
2009-10-23 13:35
标题:
详解Spring的配置文件
想必用过Spring的程序员们都有这样的感觉,Spring把逻辑层封装的太完美了(个人感觉View层封装的不是很好)。以至于有的初学者都不知道Spring配置文件的意思,就拿来用了。所以今天我给大家详细解释一下Spring的applicationContext.xml文件。Ok,还是通过代码加注释的方式为大家演示:
以下是详解Spring的applicationContext.xml文件代码:
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/tie?useUnicode=true&characterEncoding=utf-8
root
123
com/alonely/vo/User.hbm.xml
以上Spring的applicationContext.xml文件我是用的SSH架构,如果您用Spring的
MVC架构,其原理也是一样的。
本文来自ChinaUnix博客,如果查看原文请点:
http://blog.chinaunix.net/u3/104854/showart_2076576.html
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2