S1SH底层DAO
空指针一个小的DEMO S1SH框架的 不知道哪里配置错了 就是连接不上底层DAO 不论添加 修改 还是显示 只要到底层DAO 就会空指针
sturts-config:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
<data-sources />
<form-beans >
<form-bean name="messForm" type="com.war.bo.ShboaMessage" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings >
<action
attribute="messForm"
name="messForm"
path="/sys"
scope="request"
type="com.war.struts.action.SysAction">
<set-property property="cancellable" value="true" />
<forward name="query" path="/sys_list.jsp" />
<forward name="add" path="/sys_add.jsp" />
<forward name="update" path="/sys_motify.jsp" />
</action>
</action-mappings>
<message-resources parameter="com.war.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml" />
</plug-in>
</struts-config>
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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url"
value="jdbc:oracle:thin:@127.0.0.1:1521:orcl">
</property>
<property name="username" value="war3344"></property>
<property name="password" value="123456"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/war/bo/ShboaMessage.hbm.xml</value></list>
</property></bean>
<bean id="ShboaMessageDAO"
class="com.war.dao.ShboaMessageDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean name="/sys" class="com.war.struts.action.SysAction"
abstract="false" lazy-init="default" autowire="default"
dependency-check="default">