class="tags" href="/tags/SPRING.html" title=spring>spring,class="tags" href="/tags/HIBERNATE.html" title=hibernate>hibernate,class="tags" href="/tags/STRUTS.html" title=struts>struts
要改的几处:
1。 <class="tags" href="/tags/BEAN.html" title=bean>bean id="dataSource"
class="org.class="tags" href="/tags/SPRING.html" title=spring>springframework.jdbc.datasource.DriverManagerDataSource">
如果是dbcp连接会出错
NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool??????????
这是要什么包呀?
2. AdminDAO改成adminDAO,习惯用小写
3.加入class="tags" href="/tags/STRUTS.html" title=struts>struts(要有class="tags" href="/tags/SPRING.html" title=spring>spring_web.jar)
首先要在class="tags" href="/tags/STRUTS.html" title=struts>struts中注册Spring插件 class="tags" href="/tags/STRUTS.html" title=struts>struts-config.xml
<plug-in className="org.class="tags" href="/tags/SPRING.html" title=spring>springframework.web.class="tags" href="/tags/STRUTS.html" title=struts>struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-
INF/classes/applicationContext.xml" />
</plug-in>
再是class="tags" href="/tags/STRUTS.html" title=struts>struts 委托Spring配置动作 class="tags" href="/tags/STRUTS.html" title=struts>struts-config.xml
<controller
processorClass="org.class="tags" href="/tags/SPRING.html" title=spring>springframework.web.class="tags" href="/tags/STRUTS.html" title=struts>struts.DelegatingRequestProcessor"></controller>
applicationContext.xml处理class="tags" href="/tags/STRUTS.html" title=struts>struts的action
<class="tags" href="/tags/BEAN.html" title=bean>bean name="/admin" class="com.pp.class="tags" href="/tags/STRUTS.html" title=struts>struts.action.AdminAction">
<property name="adminDAO">
<ref class="tags" href="/tags/BEAN.html" title=bean>bean="adminDAO" />
</property>
</class="tags" href="/tags/BEAN.html" title=bean>bean>
4.去掉类路径上的关于Hibernate的3个lib
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
class="tags" href="/tags/HIBERNATE.html" title=hibernate>hibernate-annotations.jar