Springѧϰ֮·

2018-06-18 04:05:46À´Ô´£ºÎ´Öª ÔĶÁ ()

ÐÂÀÏ¿Í»§´ó»ØÀ¡,ÔÆ·þÎñÆ÷µÍÖÁ5ÕÛ

£¨Ò»£©´î½¨Spring.NET»·¾³³£¼ûµÄDLL 

1.spring.core --Õû¸ö¿ò¼ÜµÄ»ù´¡£¬ÊµÏÖÁËÒÀÀµ×¢ÈëµÄ¹¦ÄÜ

2.Spring.AOP--ÌṩÃæÏò·½Ãæ±à³Ì£¨aop£©µÄÖ§³Ö

3.Spring.Data--a¶¨ÒåÁËÒ»¸ö³éÏóµÄÊý¾Ý·ÃÎʲ㣬¿ÉÒÔ¿çÔ½¸÷ÖÖÊý¾Ý·ÃÎʼ¼Êõ£¨´ÓADO.NETµ½¸÷ÖÖorm£©½øÐÐÊý¾Ý·ÃÎÊ¡£

4.Common.Logging.dll

£¨¶þ£©ÅäÖÃÎļþµÄÉèÖÃ

1.XMLÎļþµÄÅäÖÃ

    ¸´ÖƵ½Êä³öĿ¼£ºÊ¼ÖÕ¸´ÖÆ

 

<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.net
        http://www.springframework.net/xsd/spring-objects.xsd">
  <object id="ÀàÃû" type="ÍêÕûµÄÀàÃû,³ÌÐò¼¯Ãû" singleton="true" >

    //Èç¹ûÀàÖаüº¬ÆäËûÀàµÄ»°
    <property name="ÊôÐÔÃû" ref="ÀàÃû" ></property>

    //ÀàÖÐÊôÐԵĸ³Öµ
    <property name="ÊôÐÔÃû" value="Öµ"></property>
  </object>
  <object id="ÀàÃû" type="ÍêÕûµÄÀàÃû,³ÌÐò¼¯Ãû"  singleton="true">
    <property name="ÊôÐÔÃû" value="Öµ"></property>
  </object>
</objects>

1.appconfig

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <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>
  <spring>
    <context>
     //XMLµÄλÖÃ
      <resource uri="file://XXX.xml"></resource>
    </context>
    <objects  xmlns="http://www.springframework.net">
    
    </objects>
  </spring>
</configuration>

 

±êÇ©£º

°æȨÉêÃ÷£º±¾Õ¾ÎÄÕ²¿·Ö×ÔÍøÂ磬ÈçÓÐÇÖȨ£¬ÇëÁªÏµ£ºwest999com@outlook.com
Ìرð×¢Ò⣺±¾Õ¾ËùÓÐתÔØÎÄÕÂÑÔÂÛ²»´ú±í±¾Õ¾¹Ûµã£¬±¾Õ¾ËùÌṩµÄÉãÓ°ÕÕƬ£¬²å»­£¬Éè¼Æ×÷Æ·£¬ÈçÐèʹÓã¬ÇëÓëÔ­×÷ÕßÁªÏµ£¬°æȨ¹éÔ­×÷ÕßËùÓÐ

ÉÏһƪ£º¶àÌõ¼þËÑË÷ÎÊÌâ -sqlÆ´½ÓÓë²ÎÊý»¯²éѯ

ÏÂһƪ£º×Ô¼º¶¯ÊÖдRedis¿Í»§¶Ë£¨C#ʵÏÖ£©2 - SETÇëÇóºÍ״̬»Ø¸´£¨set£©