<listener>
<listener->
org.apache.myfaces.webapp.StartupServletContextListener
</listener->
</listener>
<listener>
<listener->
org.springframework.web.context.ContextLoaderListener
</listener->
</listener>
Spring配置文件applicationContext.xml:这里是把IBatis数据源写在Spring文件中使Spring和IBatis结合起来
<!-- dateSource -->
<bean id="dataSource"
="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://192.168.102.19/bookadmin</value>
</property>
<property name="username">
<value>bookadmin</value>
</property>
<property name="password">
<value>123456</value>
</property>
</bean>
<!-- sqlMapClient -->
<bean id="sqlMapClient"
="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>
path:thiz/ks/bookadmin/dao/ibatis/SqlMapConfig.xml
</value>
</property>
</bean>
IBatisSqlMap文件SqlMapConfig.xml和JSF配置文件faces-config.xml:该如何写还是如何写
最新评论