zoukankan      html  css  js  c++  java
  • 一步一步学Spring.NET——1、Spring.NET环境准备

    Spring.NET 1.3.2下载地址:http://down.51cto.com/data/861700

    下载后解压

     

    Spring.NET-1.3.2.7z:这个里面有我们须要用到的全部东西。

    Spring.NET-1.3.2.exe:安装文件

    Spring.NET-1.3.2-API.chm:帮助文档

    NHibernate 3.2 的下载地址: 

    http://sourceforge.net/projects/nhibernate/files/NHibernate/3.2.0GA/

     

    点击上面红框就能够进行下载了。

    1、我们先点击安装文件Spring.NET-1.3.2.exe进行安装。安装过程点击下一步就能够了。

    完毕后,你会看到例如以下界面:

     

    2、打开Spring.NET的安装文件夹,能够看到例如以下界面:

     

    3、展开Spring.Net安装文件夹,

     

    主要目录说明:

    lib经常使用的程序集,当中包括了 NHibernate 3.2 的程序集

    schema:Xml 的架构文件 ,提供XML的智能感知功能。操作说明:将 schema 中的 .xsd文件 拷贝到 Visual Studio 的安装文件夹下的 XmlSchemas 文件夹中就能够实现xml智能提示了

    配置Spring.Net站点

    1、新建一个web站点,加入一个Index.aspx页面。

    2、加入程序集 Spring.Core.dll 和 Spring.Web.dl。Common.Logging.dll的引用

     

    为了方便管理,新建一个BLL文件夹,然后从Spring.Net的安装文件夹拷贝这三个dll程序集过来,然后加入对这三个程序集的引用。

     

    我用的是VS2010,所以拷贝4.0文件夹以下的dll文件。

    Spring.NETSpring.NETSpring.NET-1.3.2Spring.NETin et4.0 elease文件夹以下

    3、配置web.config

    在站点的 web.config 配置文件里,进行例如以下配置

    <configuration>
      <configSections>
        <!-- Spring 的配置 -->
        <sectionGroup name="spring">
          <section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
        </sectionGroup>
      </configSections>
      <spring>
        <context>
        </context>
      </spring>
        <system.web>
          <compilation debug="false" targetFramework="4.0" />
          <httpModules>
             <!--Spring 提供的 Module-->  
            <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
          </httpModules>
          <httpHandlers>
             <!--Spring 提供的处理程序--> 
            <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
            <!--取消 Spring.NET 对于 Web 服务的处理--> 
            <add verb="*" path="*.asmx" type="Spring.Web.Services.WebServiceHandlerFactory, Spring.Web"/>
            <add verb="*" path="ContextMonitor.ashx" type="Spring.Web.Support.ContextMonitor, Spring.Web"/>
            <add verb="*" path="*.ashx" type="Spring.Web.Support.DefaultHandlerFactory, Spring.Web"/>
          </httpHandlers>
        </system.web>
    </configuration>

    如今。页面应该能够正常浏览了。从此以后的页面将通过 Spring.NET 创建与管理。


  • 相关阅读:
    入门菜鸟
    FZU 1202
    XMU 1246
    Codeforces 294E Shaass the Great 树形dp
    Codeforces 773D Perishable Roads 最短路 (看题解)
    Codeforces 814E An unavoidable detour for home dp
    Codeforces 567E President and Roads 最短路 + tarjan求桥
    Codeforces 567F Mausoleum dp
    Codeforces 908G New Year and Original Order 数位dp
    Codeforces 813D Two Melodies dp
  • 原文地址:https://www.cnblogs.com/yfceshi/p/7280011.html
Copyright © 2011-2022 走看看