Spring.net 在aps.net Web的配置复习
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的配置复习的更多相关文章
- Spring MVC 搭建过程中web.xml配置引入文件的路径问题
为啥要说一下这么low的问题,因为我是一个比较low的人,哈哈.本来我技术有限,没事干自己撘个环境找找乐趣,结果被各种基础问题,弄的一脸蒙蔽.算了不多说,直接说问题. 1.首先说一下java编译后的文 ...
- 05.基于IDEA+Spring+Maven搭建测试项目--web.xml配置
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " ...
- Spring MVC的web.xml配置详解(转)
出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...
- Spring 入门 web.xml配置详解
Spring 入门 web.xml配置详解 https://www.cnblogs.com/cczz_11/p/4363314.html https://blog.csdn.net/hellolove ...
- 转-spring boot web相关配置
spring boot web相关配置 80436 spring boot集成了servlet容器,当我们在pom文件中增加spring-boot-starter-web的maven依赖时,不做任何w ...
- Spring mvc的web.xml配置详解
1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在web.xml配置监听器ContextLoaderListener(l ...
- Spring 及 SpringMVC的web.xml配置详解
出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...
- WebApplicationInitializer究 Spring 3.1之无web.xml式 基于代码配置的servlet3.0应用
本文转自http://hitmit1314.iteye.com/blog/1315816 大家应该都已经知道Spring 3.1对无web.xml式基于代码配置的servlet3.0应用.通过spri ...
- Spring Boot 2.X(四):Spring Boot 自定义 Web MVC 配置
0.准备 Spring Boot 不仅提供了相当简单使用的自动配置功能,而且开放了非常自由灵活的配置类.Spring MVC 为我们提供了 WebMvcConfigurationSupport 类和一 ...
随机推荐
- 基于标准库的string类实现简单的字符串替换
感觉基本功还是不扎实,虽然能做些程序但是现在看来我还是个初学者(primer),试着完成习题结果还得修修改改. 废话不多说,实现功能很简单,<C++ Primer>9.5.2节习题. // ...
- li布局问题
问题示意,好多网站一般都有这种布局,如 问题主要原因,第一个li没有margin-left 其余有(这里只考虑一排的情况) 第一种解决方式: <!DOCTYPE html> <htm ...
- EF中创建、使用Oracle数据库的Sequence(序列)功能
** 背景 ** 项目中订单号原来的生成规则由日期加随机数组成,后期需求决定将订单号生成规则更改为生成日期加当天当前订单数. 每天的订单数都是从0开始的,每生成一个订单,订单数就应该加1.订单数应该是 ...
- php中将数组转换为指定符号分割的字符串
如想将一个数组转换为以“,”分割的字符串,只需如下: implode(',', arr);
- oracle 中GROUP BY的用法
转自:http://blog.csdn.net/basenet855x/article/details/6694150 问题: select item.itemnum,item.in1,item.in ...
- 使用GET方式提交的表单遇到的问题
经常使用表单,一直使用的都是POST方式,POST将数据封装到请求体中,相对于GET安全一点:而POST处理中文编码问题也比GET简单(GET需要将URL编码,后台接受到后还需要解码).今天我想要使用 ...
- MySql——查询题目练习
本次查询我们基于这几张表查询 ***********查询练习********** 1. 查询Student表中的所有记录的Sname.Ssex和Class列. select sname,ssex,cl ...
- sublime text安装插件
http://www.sublimetext.com/ 安装Sublime Text 2插件的方法: 1.直接安装 安装Sublime text 2插件很方便,可以直接下载安装包解压缩到Package ...
- windows administrator提升system
最近刚好有这个需求,本想开一个super cmd,但是win10上不兼容不太好. 于是使用PsExec来提升system权限. 微软传送地址:https://docs.microsoft.com/en ...
- openssh 在32位、64位操作系统上的安装配置
openssh是安装在windows系统上的提供SSH服务的服务端软件,可以提供安全的命令行远程连接管理.下面介绍下openssh成功安装使用的操作步骤. 工具/原料 openssh window ...