1.引入程序集Spring.Core,CommonLogging,Spring.Web

2.Web.Config的配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
    </sectionGroup>
    
  </configSections>
  <spring>
    <context>
      <resource uri="config://spring/objects"/>
      <resource uri="~/Config/BLL.xml"/>
    </context>
    <objects xmlns="http://www.springframework.net">
      <object id="student" type="WebApplication5.Student, WebApplication5">
      </object>
    </objects>
  </spring>
    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
      <httpHandlers>
        
      </httpHandlers>
    </system.web>
  <system.webServer>
    <modules>
      <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
    </modules>
    <handlers>
      <add name="handle1" verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
    </handlers>
    <directoryBrowse enabled="true"/>
    
  </system.webServer>
</configuration>

BLL.XML

<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object id="Teacher" type="WebApplication5.Teacher,WebApplication5">
</object>
</objects>

3. 客户端调用部分

IApplicationContext ctx = ContextRegistry.GetContext();
            Student  stu=ctx["Student"] as Student;
            stu.SayHello();

Spring.net 在aps.net Web的配置复习的更多相关文章

  1. Spring MVC 搭建过程中web.xml配置引入文件的路径问题

    为啥要说一下这么low的问题,因为我是一个比较low的人,哈哈.本来我技术有限,没事干自己撘个环境找找乐趣,结果被各种基础问题,弄的一脸蒙蔽.算了不多说,直接说问题. 1.首先说一下java编译后的文 ...

  2. 05.基于IDEA+Spring+Maven搭建测试项目--web.xml配置

    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...

  3. Spring MVC的web.xml配置详解(转)

    出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...

  4. Spring 入门 web.xml配置详解

    Spring 入门 web.xml配置详解 https://www.cnblogs.com/cczz_11/p/4363314.html https://blog.csdn.net/hellolove ...

  5. 转-spring boot web相关配置

    spring boot web相关配置 80436 spring boot集成了servlet容器,当我们在pom文件中增加spring-boot-starter-web的maven依赖时,不做任何w ...

  6. Spring mvc的web.xml配置详解

    1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在web.xml配置监听器ContextLoaderListener(l ...

  7. Spring 及 SpringMVC的web.xml配置详解

    出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...

  8. WebApplicationInitializer究 Spring 3.1之无web.xml式 基于代码配置的servlet3.0应用

    本文转自http://hitmit1314.iteye.com/blog/1315816 大家应该都已经知道Spring 3.1对无web.xml式基于代码配置的servlet3.0应用.通过spri ...

  9. Spring Boot 2.X(四):Spring Boot 自定义 Web MVC 配置

    0.准备 Spring Boot 不仅提供了相当简单使用的自动配置功能,而且开放了非常自由灵活的配置类.Spring MVC 为我们提供了 WebMvcConfigurationSupport 类和一 ...

随机推荐

  1. mysql 使用 informatin_schema tables 创建 shell commands

    SELECT CONCAT("mysqldump -uroot -p ", TABLE_SCHEMA, " ", TABLE_NAME, " > ...

  2. 将view添加到地图覆盖物

    原文地址:http://my.oschina.net/freestyletime/blog/291638 官方例子 这个百度地图 android SDK 关于基础地图覆盖物的例子 http://dev ...

  3. ALSA声卡10_从零编写之数据传输_学习笔记

    1.引言 (1)应用程序使用声卡的时候,数据流程是:应用程序把数据发送给驱动,驱动把数据发送给硬件声卡,声卡把数据转换成声音数据播放出去. (2)可以使用两种方式发送数据 第一种:app发数据,等驱动 ...

  4. 【BZOJ】1441 Min(数学)

    题目 传送门:QWQ 分析 裴蜀定理. 因为存在 $ a_1 $ $ a_2 $...... $ a_n $的最大公约数为 $ d $,那么必定存在 $ x_1*a_1+x_2*a_2+...x_n* ...

  5. java死锁及解决方案

    死锁是两个甚至多个线程被永久阻塞时的一种运行局面,这种局面的生成伴随着至少两个线程和两个或者多个资源.避免死锁方针:a:避免嵌套封锁:这是死锁最主要的原因的,如果你已经有一个资源了就要避免封锁另一个资 ...

  6. ISIS与OSPF的区别与联系

    共同之处: 1 都是链路状态路由协议,都要求区域内的路由器交换链路状态信息,链路状态信息被收集到链路状态数据库中 2 都是用了一种实现路由选择信息交换相似机制 3 都在广播网络中选择指定路由器来控制扩 ...

  7. Spring AOP详解及简单应用

    Spring AOP详解   一.前言 在以前的项目中,很少去关注spring aop的具体实现与理论,只是简单了解了一下什么是aop具体怎么用,看到了一篇博文写得还不错,就转载来学习一下,博文地址: ...

  8. TabControl关闭选项卡

    关闭TabControl选项卡: Private Sub TabControl_Main_CloseButtonClick(sender As Object, e As EventArgs) Hand ...

  9. 思科ASA 基础学习

    ASA int e0/0 ip add 192.168.1.1 24nameif insidesecruity-leve 100 int e0/0/0ip add 192.168.2.1 24name ...

  10. c++builder 读写文件类

    c++builder 读写文件类 TStreamReader.TStreamWriter读取一行 http://docwiki.embarcadero.com/CodeExamples/XE8/en/ ...