锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品免费观看,久久国产亚洲高清观看,亚洲视频中文字幕在线http://www.tkk7.com/vcycyv/category/47722.htmlzh-cnMon, 14 Mar 2011 03:46:27 GMTMon, 14 Mar 2011 03:46:27 GMT60鎬葷粨Spring Security涔?鍏充簬鎺堟潈錛屼繚鎶eb鍜屼繚鎶ゆ柟娉?/title><link>http://www.tkk7.com/vcycyv/archive/2011/03/14/346178.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Mon, 14 Mar 2011 00:41:00 GMT</pubDate><guid>http://www.tkk7.com/vcycyv/archive/2011/03/14/346178.html</guid><wfw:comment>http://www.tkk7.com/vcycyv/comments/346178.html</wfw:comment><comments>http://www.tkk7.com/vcycyv/archive/2011/03/14/346178.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/vcycyv/comments/commentRss/346178.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/vcycyv/services/trackbacks/346178.html</trackback:ping><description><![CDATA[     鎽樿: 鎺ヤ笂涓綃?鎬葷粨Spring Security涔?鍏充簬Authentication * 鍏充簬鎺堟潈 AcessDecisionManager鏄鎺堟潈鐨勩傚叿浣撴巿鏉冿紙authorization錛夌殑宸ヤ綔鏄氦緇欎竴緋誨垪Voter鏉ュ仛鐨勩傛瘡涓猇oter閮藉疄鐜癆ccessDecisionVoter鎺ュ彛鐨剉ote鏂規硶錛岃繑鍥?int ACCESS_GRANTED = 1;錛堟姇璧炴垚紲級 int ACCESS_ABSTA...  <a href='http://www.tkk7.com/vcycyv/archive/2011/03/14/346178.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/vcycyv/aggbug/346178.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-03-14 08:41 <a href="http://www.tkk7.com/vcycyv/archive/2011/03/14/346178.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎬葷粨Spring Security涔?鍏充簬Authenticationhttp://www.tkk7.com/vcycyv/archive/2011/03/08/345922.html浜哄湪姹熸箹浜哄湪姹熸箹Tue, 08 Mar 2011 03:02:00 GMThttp://www.tkk7.com/vcycyv/archive/2011/03/08/345922.htmlhttp://www.tkk7.com/vcycyv/comments/345922.htmlhttp://www.tkk7.com/vcycyv/archive/2011/03/08/345922.html#Feedback0http://www.tkk7.com/vcycyv/comments/commentRss/345922.htmlhttp://www.tkk7.com/vcycyv/services/trackbacks/345922.html鍓嶈█
寮濮嬭姳浜嗕袱涓夊ぉ鐨勬椂闂村Spring Security錛岃繕鏄簯灞遍浘緗╃殑錛屽ぇ鍙楁墦鍑匯備簬鏄噸鏂版葷粨涓涓嬶紝椋炶秺榪烽浘錛屾⒊鐞嗘濊礬錛屽啓榪欐牱涓綃囨枃瀛椼傜綉涓婃湁涓浄閿嬪啓浜哠pring Security2 瀛︿範綺捐錛歨ttp://www.javaeye.com/topic/319965閲岄潰鍖呭惈鍙互榪愯鐨勪唬鐮侊紝濡傛灉浣犲spring scurity鎰熷叴瓚o紝鍙互蹇熸祻瑙堜竴涓嬩笅闈㈢殑絎旇錛岀劧鍚巇ebug code錛岀劧鍚庡啀鐪嬬湅絎旇銆係pring Security鐨勫唴瀹硅繙姣旂瑪璁板鏉傦紝鎴戝彧鏄牴鎹嚜宸辯殑鐞嗚В鎸戦噸瑕佺殑璁板綍騫舵暣鐞嗕竴涓嬨傛妸sample code涔熷綋浣滅瑪璁扮殑涓閮ㄥ垎錛岄偅涓猚ode榪樻槸姣旇緝綺劇畝鍦幫紝鏇撮噸瑕佺殑鏄疄鐢ㄣ?br /> 瀹樻柟鎻愪緵鐨剆ample code鍖呭眳鐒舵病鏈夋簮浠g爜錛宖aint錛?google鍗婂ぉ鎵懼埌http://grepcode.com/snapshot/repo1.maven.org/maven2/org.springframework.security/spring-security-samples-contacts/2.0.0 褰撶劧錛屽鏋滀綘浼氱敤git鐨勮瘽涔熷彲浠ヨ嚜宸眂heck out code, 涓嶈繃鎴戞病鐢ㄨ繃git榪欑楂樼駭璐с?br />
姝f枃
璺熸潈闄愭湁鍏崇殑涓や釜姒傚康鏄?璁よ瘉 鍜?鎺堟潈錛?鍏堜笂涓浘錛?/p>

image

Run-As Manager 鍜?After-Invocation Manager涓嶉噸瑕?/p>

The  actual  implementation  of  a  security  interceptor  will  depend  on  what resource is being secured. If you’re securing a URL in a web application, the security  interceptor  will  be  implemented  as  a  servlet  filter.  But  if  you’re  securing  a method invocation, aspects will be used to enforce security.

榪欑瘒鍙Authentication Manager:

璁よ瘉鏄氳繃AuthenticationManager鏉ョ鐨勶紝

public interface AuthenticationManager {
  public Authentication authenticate(Authentication authentication)
      throws AuthenticationException;

}

The  authenticate()  method  will  attempt  to  authenticate  the  user  using  the org.acegisecurity.Authentication object (which carries the principal and credentials). If successful, the authenticate() method returns a complete Authentication  object,  including  information  about  the  user’s  granted  authorities (which will be considered by the authorization manager).

鍏蜂綋鐨勫伐浣滄槸浜ょ粰鍚勪釜 authentication provider鏉ュ仛鐨勶細

image

榪欓噷provider manager鍖呭惈澶氫釜鍏蜂綋鐨刾roviders:

<bean id="authenticationManager"
    class="org.acegisecurity.providers.ProviderManager">
  <property name="providers">
    <list>
      <ref bean="daoAuthenticationProvider"/>
      <ref bean="ldapAuthenticationProvider"/>
    </list>
  </property>
</bean>
ProviderManager is given its list of authentication providers through its providers property.

浠aoAuthenticationProvider涓句緥錛?

<bean id="authenticationProvider"
    class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
  <property name="userDetailsService"
      ref="userDetailsService"/>
</bean>

瀹冧細瑕佹眰涓涓猆serDetailsService, 璺熷畠鐩稿叧鐨勬槸UserDetails鎺ュ彛

UserDetailsService鎺ュ彛鏄釜綆鍗曠殑鎺ュ彛

public interface UserDetailsService {
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException;
}

 

UserDetails鎺ュ彛濡備笅錛?

public interface UserDetails extends Serializable {
    GrantedAuthority[] getAuthorities();

    String getPassword();

    String getUsername();

    boolean isAccountNonExpired();

    boolean isAccountNonLocked();

    boolean isCredentialsNonExpired();

    boolean isEnabled();
}

瑙i噴涓涓媑etAuthorities:璇ユ柟娉曡繑鍥炰竴涓狦rantedAuthority[]鏁扮粍瀵硅薄錛孏rantedAuthority鏄敤鎴鋒潈闄愪俊鎭璞★紝榪欎釜瀵硅薄涓畾涔変簡涓涓幏鍙栫敤鎴鋒潈闄愭弿榪頒俊鎭殑getAuthority()鏂規硶銆?

闇瑕佹敞鎰?em>Authentication瀵硅薄鎵嶆槸Spring Security浣跨敤鐨勮繘琛屽畨鍏ㄨ闂帶鍒剁敤鎴蜂俊鎭畨鍏ㄥ璞°傚疄闄呬笂錛孉uthentication瀵硅薄鏈夋湭璁よ瘉鍜屽凡璁よ瘉涓ょ鐘舵侊紝鍦ㄤ綔涓哄弬鏁頒紶鍏ヨ璇佺鐞嗗櫒錛圓uthenticationManager錛夌殑authenticate鏂規硶鏃訛紝鏄竴涓湭璁よ瘉鐨勫璞★紝瀹冧粠瀹㈡埛绔幏鍙栫敤鎴風殑韜喚淇℃伅錛堝鐢ㄦ埛鍚嶏紝瀵嗙爜錛夛紝鍙互鏄粠涓涓櫥褰曢〉闈紝涔熷彲浠ヤ粠Cookie涓幏鍙栵紝騫剁敱緋葷粺鑷姩鏋勯犳垚涓涓狝uthentication瀵硅薄銆傝岃繖閲屾彁鍒扮殑UserDetails浠h〃涓涓敤鎴峰畨鍏ㄤ俊鎭殑婧愶紙浠庢暟鎹簱錛孡DAP鏈嶅姟鍣紝CA涓績榪斿洖錛夛紝Spring Security瑕佸仛鐨勫氨鏄皢榪欎釜鏈璇佺殑Authentication瀵硅薄鍜孶serDetails榪涜鍖歸厤錛屾垚鍔熷悗灝哢serDetails涓殑鐢ㄦ埛鏉冮檺淇℃伅鎷瘋礉鍒癆uthentication涓粍鎴愪竴涓畬鏁寸殑Authentication瀵硅薄錛屽叡鍏跺畠緇勪歡鍏變韓銆?

 
涓嬩竴綃囷細 鎬葷粨Spring Security涔?鍏充簬鎺堟潈錛屼繚鎶eb鍜屼繚鎶ゆ柟娉?/u> 
 

鍙傝冿細

Spring in Action

Spring Security瀛︿範鎬葷粨錛?http://www.tkk7.com/redhatlinux/archive/2008/08/20/223148.html

Spring Security2 瀛︿範綺捐錛?http://www.javaeye.com/topic/319965



]]>
璇︾粏璁茶В鍦⊿pring涓繘琛岄泦鎴愭祴璇曪紙杞級http://www.tkk7.com/vcycyv/archive/2011/02/24/345040.html浜哄湪姹熸箹浜哄湪姹熸箹Thu, 24 Feb 2011 02:12:00 GMThttp://www.tkk7.com/vcycyv/archive/2011/02/24/345040.htmlhttp://www.tkk7.com/vcycyv/comments/345040.htmlhttp://www.tkk7.com/vcycyv/archive/2011/02/24/345040.html#Feedback0http://www.tkk7.com/vcycyv/comments/commentRss/345040.htmlhttp://www.tkk7.com/vcycyv/services/trackbacks/345040.html闃呰鍏ㄦ枃

]]>
spring security2 閰嶇疆綺捐錛堣漿錛?/title><link>http://www.tkk7.com/vcycyv/archive/2011/02/13/344196.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 13 Feb 2011 06:47:00 GMT</pubDate><guid>http://www.tkk7.com/vcycyv/archive/2011/02/13/344196.html</guid><wfw:comment>http://www.tkk7.com/vcycyv/comments/344196.html</wfw:comment><comments>http://www.tkk7.com/vcycyv/archive/2011/02/13/344196.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/vcycyv/comments/commentRss/344196.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/vcycyv/services/trackbacks/344196.html</trackback:ping><description><![CDATA[     鎽樿: 杞澆鑷細http://www.javaeye.com/topic/319965 璁哄潧涓婄湅浜嗕笉灝慡pring Security鐨勭浉鍏蟲枃绔犮傝繖浜涙枃绔犲熀鏈笂閮借繕鏄熀浜嶢cegi-1.X鐨勯厤緗柟寮忥紝鑰屼富瑕佺殑閰嶇疆紺轟緥涔熸潵鑷簬SpringSide鐨勮礎鐚? 浼楁墍鍛ㄧ煡錛孲pring Security閽堝Acegi鐨勪竴涓噸澶х殑鏀硅繘灝卞湪浜庡叾閰嶇疆鏂瑰紡澶уぇ綆鍖栦簡銆傛墍浠ュ鏋滈厤緗繕鏄熀浜嶢cegi-1.X榪欐牱姣旇緝綣佺悙鐨?..  <a href='http://www.tkk7.com/vcycyv/archive/2011/02/13/344196.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/vcycyv/aggbug/344196.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-02-13 14:47 <a href="http://www.tkk7.com/vcycyv/archive/2011/02/13/344196.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>spring factory-method 鍔ㄦ佷紶鍙傛暟錛堣漿錛?/title><link>http://www.tkk7.com/vcycyv/archive/2011/01/30/343778.html</link><dc:creator>浜哄湪姹熸箹</dc:creator><author>浜哄湪姹熸箹</author><pubDate>Sun, 30 Jan 2011 10:04:00 GMT</pubDate><guid>http://www.tkk7.com/vcycyv/archive/2011/01/30/343778.html</guid><wfw:comment>http://www.tkk7.com/vcycyv/comments/343778.html</wfw:comment><comments>http://www.tkk7.com/vcycyv/archive/2011/01/30/343778.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/vcycyv/comments/commentRss/343778.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/vcycyv/services/trackbacks/343778.html</trackback:ping><description><![CDATA[<p>杞澆鑷?<a title="http://forum.springsource.org/showthread.php?t=50934" >http://forum.springsource.org/showthread.php?t=50934</a></p> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff">class</span> ExampleBean {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> <span style="color: #0000ff">private</span> String string;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff">public</span> ExampleBean(String string) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> <span style="color: #0000ff">this</span>.string = string;</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5"> 5:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6"> 6:</span> </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7"> 7:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> write() {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8"> 8:</span> System.out.println(<span style="color: #006080">"The text is: "</span> + text);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9"> 9:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10"> 10:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11"> 11:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12"> 12:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13"> 13:</span> <span style="color: #0000ff">class</span> ExampleBeanFactory {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14"> 14:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> ExampleBean createExampleBean(String string) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15"> 15:</span> <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> ExampleBean(string);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16"> 16:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17"> 17:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18"> 18:</span>  </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19"> 19:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Main {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20"> 20:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> main(String[] args) {</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21"> 21:</span> ApplicationContext context = <span style="color: #0000ff">new</span> ClassPathXmlApplicationContext(</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22"> 22:</span> <span style="color: #006080">"context.xml"</span>);</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23"> 23:</span> ExampleBean exampleBean = </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24"> 24:</span> ExampleBean)context.getBean(<span style="color: #006080">"exampleBean"</span>, </pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25"> 25:</span> <span style="color: #0000ff">new</span> Object[]{<span style="color: #006080">"bla bla"</span>});</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26"> 26:</span> exampleBean.write();</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27"> 27:</span> }</pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28"> 28:</span> }</pre><!--CRLF--></div></div> <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"> <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1"> 1:</span> <span style="color: #0000ff"><</span><span style="color: #800000">bean</span> <span style="color: #ff0000">id</span><span style="color: #0000ff">="exampleBean"</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">="...ExampleBeanFactory"</span> <span style="color: #ff0000">scope</span><span style="color: #0000ff">="prototype"</span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2"> 2:</span> <span style="color: #ff0000">factory-method</span><span style="color: #0000ff">="createExampleBean"</span><span style="color: #0000ff">></span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3"> 3:</span> <span style="color: #0000ff"><</span><span style="color: #800000">constructor-arg</span> <span style="color: #ff0000">value</span><span style="color: #0000ff">="default value"</span><span style="color: #0000ff">/></span></pre><!--CRLF--><pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4"> 4:</span> <span style="color: #0000ff"></</span><span style="color: #800000">bean</span><span style="color: #0000ff">></span></pre><!--CRLF--></div></div> <p> </p> <p>娉ㄦ剰scope浣跨敤prototype</p> <img src ="http://www.tkk7.com/vcycyv/aggbug/343778.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-01-30 18:04 <a href="http://www.tkk7.com/vcycyv/archive/2011/01/30/343778.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://xingqiu1.com" target="_blank">成人国产mv免费视频</a>| <a href="http://liulian88.com" target="_blank">亚洲αv久久久噜噜噜噜噜</a>| <a href="http://sdshfengji.com" target="_blank">外国成人网在线观看免费视频</a>| <a href="http://66keke.com" target="_blank">亚洲欧美乱色情图片</a>| <a href="http://scienfood.com" target="_blank">麻豆亚洲AV永久无码精品久久</a>| <a href="http://muguangmi.com" target="_blank">亚洲国产成人五月综合网</a>| <a href="http://rdccc.com" target="_blank">a毛片基地免费全部视频</a>| <a href="http://taoh2507.com" target="_blank">在线观看特色大片免费网站</a>| <a href="http://818812.com" target="_blank">美女露隐私全部免费直播</a>| <a href="http://kekead.com" target="_blank">成人区精品一区二区不卡亚洲</a>| <a href="http://beijinzhongliuyiyuan.com" target="_blank">好看的亚洲黄色经典</a>| <a href="http://df8848.com" target="_blank">亚洲国产成人久久精品99</a>| <a href="http://jinluffcl.com" target="_blank">在线免费观看一区二区三区</a>| <a href="http://socgl.com" target="_blank">114一级毛片免费</a>| <a href="http://jomashopcn.com" target="_blank">久久久久久久99精品免费</a>| <a href="http://8833655.com" target="_blank">久久九九久精品国产免费直播</a>| <a href="http://www-175345.com" target="_blank">丰满亚洲大尺度无码无码专线</a>| <a href="http://clzqb2b.com" target="_blank">97se亚洲国产综合自在线</a>| <a href="http://bjbanjia01.com" target="_blank">日韩亚洲Av人人夜夜澡人人爽 </a>| <a href="http://m8va.com" target="_blank">精品国产_亚洲人成在线高清</a>| <a href="http://35469642.com" target="_blank">亚洲Av无码乱码在线观看性色</a>| <a href="http://chandou8.com" target="_blank">亚洲第一成年免费网站</a>| <a href="http://fjwkjx.com" target="_blank">免费观看美女用震蛋喷水的视频 </a>| <a href="http://52xbjs.com" target="_blank">亚洲熟妇av一区二区三区</a>| <a href="http://8xk7u9.com" target="_blank">亚洲?V无码乱码国产精品</a>| <a href="http://www-c559.com" target="_blank">日韩免费无砖专区2020狼</a>| <a href="http://gzweida88.com" target="_blank">成人啪精品视频免费网站</a>| <a href="http://av520av.com" target="_blank">成人奭片免费观看</a>| <a href="http://513109.com" target="_blank">思思99re66在线精品免费观看</a>| <a href="http://gujingyuye.com" target="_blank">成年性生交大片免费看</a>| <a href="http://0551dfcy.com" target="_blank">最近中文字幕免费mv视频7</a>| <a href="http://kaixininvestment.com" target="_blank">亚洲免费综合色在线视频</a>| <a href="http://iguasheng.com" target="_blank">猫咪社区免费资源在线观看 </a>| <a href="http://zzzttt669.com" target="_blank">国产婷婷综合丁香亚洲欧洲</a>| <a href="http://langya2255.com" target="_blank">麻豆狠色伊人亚洲综合网站</a>| <a href="http://jiujiujingpin.com" target="_blank">久久精品国产亚洲av麻豆蜜芽 </a>| <a href="http://www77714.com" target="_blank">国产免费的野战视频</a>| <a href="http://www003924.com" target="_blank">波多野结衣中文字幕免费视频 </a>| <a href="http://juytv.com" target="_blank">亚洲av永久综合在线观看尤物</a>| <a href="http://46339cc.com" target="_blank">亚洲国产精品美女</a>| <a href="http://www321fafa.com" target="_blank">亚洲国产乱码最新视频</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>