zoukankan      html  css  js  c++  java
  • ssh整合

    ssh整合困扰了me好几天,终于给弄好了!
    大体步骤如下:
    1,我是先整合spring和hibernate这俩个框架,这里就不再重复写了,之前已经写过了,地址
    http://blog.csdn.net/shipeng22022/article/details/9149307
    2,整合完后这俩个框架,接下来整合struts2,把struts2相关东西都建好了之后,重在配置文件
    首先在struts.xml文件里<package ....>之前加入
      <constant name="struts.objectFactory" value="spring"/>        <!--把struts2里的action交给spring来控制-->
    <constant name="struts.devMode" value="true"/>                <!--开发模式-->
    3,在web,xml文件里进行配置
    在里面加入
      <context-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>/WEB-INF/classes/beans.xml</param-value>        <!--你的spring配置文件地址-->
      </context-param>
      
      <listener>  
        <description>Spring core configuration</description>  
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  
      </listener> 
      
    4,到这里就配置完成了

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    关于AutoResetEvent和ManualResetEvent
    (转)使用 ODP.NET 和引用游标优化结果集
    胰腺
    SQL Cache Dependency
    败犬的远吠?
    吃亏和付出经常是必须的(转)
    AutoResetEvent 与 ManualResetEvent送花例子
    linux yum install
    SpringMVC+JPA+SpringData配置
    Spring AOP 实现原理
  • 原文地址:https://www.cnblogs.com/shipeng22022/p/4614066.html
Copyright © 2011-2022 走看看