锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品免费观看,久久国产亚洲高清观看,亚洲视频中文字幕在线http://m.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://m.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://m.tkk7.com/vcycyv/archive/2011/03/14/346178.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/346178.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/03/14/346178.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/346178.html</wfw:commentRss><trackback:ping>http://m.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://m.tkk7.com/vcycyv/archive/2011/03/14/346178.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/vcycyv/aggbug/346178.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-03-14 08:41 <a href="http://m.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://m.tkk7.com/vcycyv/archive/2011/03/08/345922.html浜哄湪姹熸箹浜哄湪姹熸箹Tue, 08 Mar 2011 03:02:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/03/08/345922.htmlhttp://m.tkk7.com/vcycyv/comments/345922.htmlhttp://m.tkk7.com/vcycyv/archive/2011/03/08/345922.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/345922.htmlhttp://m.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://m.tkk7.com/redhatlinux/archive/2008/08/20/223148.html

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



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

]]>
spring security2 閰嶇疆綺捐錛堣漿錛?/title><link>http://m.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://m.tkk7.com/vcycyv/archive/2011/02/13/344196.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/344196.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/02/13/344196.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/344196.html</wfw:commentRss><trackback:ping>http://m.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://m.tkk7.com/vcycyv/archive/2011/02/13/344196.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/vcycyv/aggbug/344196.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-02-13 14:47 <a href="http://m.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://m.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://m.tkk7.com/vcycyv/archive/2011/01/30/343778.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/343778.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/01/30/343778.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/343778.html</wfw:commentRss><trackback:ping>http://m.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://m.tkk7.com/vcycyv/aggbug/343778.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">浜哄湪姹熸箹</a> 2011-01-30 18:04 <a href="http://m.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://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://hbjinmaitang.com" target="_blank">女人被弄到高潮的免费视频</a>| <a href="http://igao4.com" target="_blank">国产精品免费高清在线观看</a>| <a href="http://lzlcp.com" target="_blank">成年人网站在线免费观看</a>| <a href="http://9196528.com" target="_blank">亚洲婷婷综合色高清在线</a>| <a href="http://kssijia.com" target="_blank">蜜桃AV无码免费看永久</a>| <a href="http://www003924.com" target="_blank">亚洲特级aaaaaa毛片</a>| <a href="http://alankell.com" target="_blank">国拍在线精品视频免费观看</a>| <a href="http://www44xixi.com" target="_blank">亚洲欧洲日产v特级毛片</a>| <a href="http://xvwenyue.com" target="_blank">永久免费av无码网站韩国毛片</a>| <a href="http://mhysf.com" target="_blank">亚洲w码欧洲s码免费</a>| <a href="http://whspmd.com" target="_blank">永久免费毛片手机版在线看</a>| <a href="http://86trader.com" target="_blank">亚洲日韩在线中文字幕综合</a>| <a href="http://074g8.com" target="_blank">国产精品亚洲玖玖玖在线观看</a>| <a href="http://34jjjj.com" target="_blank">国产成人无码精品久久久免费 </a>| <a href="http://apguangyu.com" target="_blank">一级毛片免费观看不收费</a>| <a href="http://34jjjj.com" target="_blank">亚洲免费日韩无码系列</a>| <a href="http://56v6.com" target="_blank">国产免费无码AV片在线观看不卡</a>| <a href="http://yuanzhouxh.com" target="_blank">亚洲AV无码不卡无码</a>| <a href="http://clever-ad.com" target="_blank">野花高清在线观看免费3中文 </a>| <a href="http://666mou.com" target="_blank">亚洲av区一区二区三</a>| <a href="http://jsky163.com" target="_blank">香蕉免费看一区二区三区</a>| <a href="http://sese3366.com" target="_blank">亚洲成人精品久久</a>| <a href="http://ksp33.com" target="_blank">一二三四在线观看免费高清中文在线观看 </a>| <a href="http://4eeyy.com" target="_blank">亚洲国产成人久久综合一区</a>| <a href="http://777mecom.com" target="_blank">免费无码A片一区二三区</a>| <a href="http://2499m.com" target="_blank">国产成人亚洲综合a∨</a>| <a href="http://xa69.com" target="_blank">亚洲AV综合色一区二区三区</a>| <a href="http://d3q4.com" target="_blank">99久久这里只精品国产免费</a>| <a href="http://wwwy6x22.com" target="_blank">国产亚洲综合久久</a>| <a href="http://fantoment.com" target="_blank">九月丁香婷婷亚洲综合色</a>| <a href="http://zzhjnmzp.com" target="_blank">嘿嘿嘿视频免费网站在线观看</a>| <a href="http://gachi1151.com" target="_blank">亚洲欧美日韩中文二区</a>| <a href="http://bobostrong31.com" target="_blank">亚洲福利视频一区二区</a>| <a href="http://18jko.com" target="_blank">37pao成人国产永久免费视频 </a>| <a href="http://sdcwpfw.com" target="_blank">精品久久亚洲中文无码</a>| <a href="http://hysw100.com" target="_blank">亚洲AV伊人久久青青草原</a>| <a href="http://747767.com" target="_blank">91成人免费观看</a>| <a href="http://www-070755.com" target="_blank">男女超爽视频免费播放</a>| <a href="http://ranjihua.com" target="_blank">亚洲a一级免费视频</a>| <a href="http://by9277.com" target="_blank">国产在线19禁免费观看国产</a>| <a href="http://wx-jn.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>