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. 关于PIPELINE,也许你应该知道

    所谓流水线(pipeline)设计,通常来说是流水生产线. 同样,组合逻辑路径可以看作是一条生产线,路径上的每个逻辑单元都可以看作是一个阶段,都会产生时延. 如果不采用流水设计,前后级组合逻辑依次工作 ...

  2. appium+python自动化41-切换webview时候报chromedriver版本问题

    前言 用appium切换webview的时候报chrome和chromedriver版本的问题:session not created exception: Chrome version must b ...

  3. java代码----大二上机考试

    总结:对 冒泡排序熟悉,但不能灵活插入代码 package com.dkl; import java.io.*; import java.io.IOException; import java.uti ...

  4. java6枚举类型

    java.lang.Enum > 使用enum定义. 类如: public class EnumDemo { enum Edge { TOP, BOTTOM, LEFT, RIGHT//定义了一 ...

  5. PAT甲级目录

    树(23) 备注 1004 Counting Leaves   1020 Tree Traversals   1043 Is It a Binary Search Tree 判断BST,BST的性质 ...

  6. 电话号码以185****3547显示demo

    String phone="18678473547"; //String phones = phone.substring(0,phone.length()-(phone.subs ...

  7. oracle用户解锁

    创建一个概要文件 create profile frank_profile limit    SESSIONS_PER_USER  5    IDLE_TIME  2    FAILED_LOGIN_ ...

  8. servlet对应.net中的http上下文

    java中的servlet在.net中其实就是http上下文.

  9. Entity Framework 5.0系列之EF概览-三种编程方式

    概述 在开发面向数据的软件时我们常常为了解决业务问题实体.关系和逻辑构建模型而费尽心机,ORM的产生为我们提供了一种优雅的解决方案.ADO.NET Entity Framework是.NET开发中一种 ...

  10. 为什么要使用叶脊(leaf-spine)拓扑网络?

    三层网络设计的结构发展已经很成熟,但leaf-spine (leaf叶节点,spine脊节点)结构越来越热门,网络设计师们应该如何进行选择呢? 尽管三层网络结构应用广泛而且技术成熟,但随着技术的发展, ...