Sprint. Net notes, sprint.net notes

Source: Internet
Author: User

Sprint. Net notes, sprint.net notes

I did not write the first blog I wrote in my life. Please instruct experts.

1. Introduce Spring. Core. dll and Common. Logging. dll.

2. Add the sprint node to <ConfigSections> of Web. conf In the UI Layer.

<configSections>  <sectionGroup name="spring">    <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>    <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>  </sectionGroup></configSections>

3. Add it under <configuration>.

<configuration>  ...  ...  ...  <spring>    <context>      <resource uri="config://spring/objects" />    </context>    <objects xmlns="http://www.springframework.net">      <object id="UserInfoService" type="Icdce.UserLimit.BLL.UserInfoService,Icdce.UserLimit.BLL" singleton="false"></object>    </objects>  </spring></configuration>

4. Then the frontend can call the intermediate method.

IApplicationContext ctx = ContextRegistry.GetContext();IBLL.IUserInfoService userInfo = ctx.GetObject("UserInfoService") as IBLL.IUserInfoService;

  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.