爱玺玺

爱玺玺的生活日记本。wx:lb87626

用myeclipse配置ssh最后只发布一个站点,并且注意有时候软件没有发布完全而导致的问题

用myeclipse配置ssh最后只发布一个站点,并且注意有时候软件没有发布完全而导致的问题

web.xml配置spring遇到的问题。

beans.xml 这个calsspath:bean.xml没有配置,这里是web.xml中的配置。这个beans.xml文件需要换成实际使用的applicationContext.xml文件,文件命名可以改,但是路径要给对。

再次发布问题解决。


编程一定要学会看报错,一定要学会看报错和日志。不要有畏惧心里。

编程一定要学会看报错,一定要学会看报错和日志。不要有畏惧心里。

struts的本质还是servlet,因此需要在web.xml中配置

<servlet>

<servlet-name>struts</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

分析ssh

spring进行aop切面。

struts进行前端form表单,form对象,action。

hibernate进行domain对象和数据库的表的映射。

spring可以将struts的action和hibernate的service到进行初始化处理,然后对其进行管理。

spring配置hibernate的二级缓存

<property name="hibernateProperties">

    <value>

        hibernate.d

再理解spring管理hibernate

在spring配置文件applicationContext.xml里面配置数据源,配置hibernate的sessionFactory


通过上面的配置就可以使用hibernate了,但是每次都要写transaction事务,因此可以在spring的applicationContext.xml里面配置上事务管理器。

 <!-- 使用事务来统一管理事务 -->

   <bean id=&

hibernate创建表的字段顺序是按照配置的bean.hbm.xml来创建的

Employer.hbm.xml


<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE hibernate-mapping PUBLIC 

"-//Hibernate/Hibernate Mapping DTD 3.0//EN"

Cannot initialize RequestProcessor of class org.springframework.web.struts.DelegatingRequestProcesso

报错:Cannot initialize RequestProcessor of class org.springframework.web.struts.DelegatingRequestProcessor: java.lang.ClassNotFoundException: org.springframework.web.struts.DelegatingRequestProcessor


   解决方法:org.springfra

spring关联struts可以解决struts的单例问题

spring关联struts可以解决struts的单例问题

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5