使用SSH框架时需要的配置信息
1、struts (1)web.xml中要配置的信息如下: org.springframework.web.context.ContextLoaderListener
(2)struts.xml文件 可使用引用使文件结构清楚。
二、Spring 包括context-hibernate.xml和applicationContext*.xml,前者配置hibernate中的部分信息和dao对象及其代理,后者配置action对象,可使用使文件结构清晰。
三、hibernate (1)*.hbm.xml 映射文件 可以在该映射文件中设置各个对象之间的映射关系,通过(一对多)和(多对一),代码如下: a、set(一对多) b、many-to-one(多对一) (2)context-hibernate.xml中配置datasource等信息,如下: com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/kjbrc?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=UTF8 root root