´«ÖDz¥¿ÍJAVAÅàѵ2010 5 18 spring
´«ÖDz¥¿ÍJAVAÅàѵ2010-5-18 spring
SpringµÄ»ù±¾Ê¹Óúܼòµ¥¡£µ«ÊǶÔÒ»¸öÏëÒª³ÉΪ¸ßÊÖµÄÈËÀ´½²£¬ÎҸоõ»¹ÊÇÓÐÏ൱µÄÄѶȣ¬ÌرðÊÇÔÚ¶Ìʱ¼äµÄ·¶Î§Ö®ÄÚ£¬ÄÑÉϼÓÄÑŶ£¡´ó¼Ò¶¼ÖªµÀÊÕ»ñÊǺ͸¶³ö³ÉÕý±ÈµÄ£¬¶øѧϰ£¬ÓÖ²»Ò»¶¨ÊǸ¶³ö¶¼ÓÐÊÕ»ñµÄ£¬»¹µÃ¿´ÎòÐԺͻù´¡¡£¾ÍºÃ±ÈÒ»¸öûÓÐÉϹý¸ßÖеÄѧÉúÖ±½ÓÓɳõÖÐÌøµ½´óѧ£¬ºó¹û¿ÉÏëÖ®Öª£¬ÉÏ¿ÎÈç¶ÁÌìÊ飡̸ºÎ¼òµ¥¡£
ËùÒÔ£¬»ù´¡ÖØÒª£¬ÄÍÐĸüÖØÒª¡£Ã»ÓÐÖ´Ö®ÒÔºãµÄÐÄ̬£¬ ÊÇÎÞ·¨³ÉΪһ¸ö¸ßÊֵģ¬×î½üÎÒÒ²·¢ÏÖÎÒ×Ô¼ººÜºó¸¡Ô꣬×ÜÊÇÏë³ÉΪ¸ßÊÖ£¬ËùÒÔûÈÕûÓÐÒ¹µÄ¿´Ê飬µ«ÊÇÎÒµ½ÏÖÔÚ»¹ÊÇûÓгÉΪ¸ßÊÖ£¬»òÐí½«À´»á¡£µ«ÊÇ£¬³ÉΪ¸ßÊÖÈ´²¢·ÇÒ»³¯Ò»Ï¦Ö®¹¦°¡£¬·ÇÈýÄêÎåÔØ¿´À´ÊDz»³ÉÁË£¬ÒªÑ§Ï°µÄ¶«Î÷£¬Òª²¹µÄ»ù´¡£¬Ò»¸öÓÖÓÐÒ»¸öµÄ¿²ÕýµÈ×ÅÎÒÈ¥·Ô½£¬Ã»ÓÐÒãÁ¦£¬Ì¸ºÎÈÝÒ×£¿³¯ÈýĺËÄ£¬ÄÜÂð£¿
Ò»¡¢AOP¸ÅÄî
1.Á¬½Óµã¡£Í¨ÖªÖ´Ðеĵصã
Ò»¸ö³ÌÐòÖ´Ðйý³ÌÖеÄÌض¨µã¡£±ÈÈ磺¶ÔÒ»¸ö·½·¨µÄµ÷Ó㬷½·¨Ö´ÐеĹý³Ì±¾Éí£¬
ÀàµÄ³õʼ»¯£¬¶ÔÏóµÄʵÀý»¯¡£ÓÃÀ´¶¨ÒåÔÚ³ÌÐòµÄʲôµØ·½ÄÜͨ¹ýAOP¼ÓÈë¶îÍâµÄ Âß¼¡£
2.֪ͨ¡£Ìض¨¹¦ÄܵĴúÂë
ÔÚÌض¨Á¬½Óµã´¦ÔËÐеĴúÂë¡£ÓÐÇ°Ö㬺óÖõÈ֪ͨ¡£
3.ÇÐÈëµã¡£Ò»×éÁ¬½Óµã
¶¨ÒåÒ»¸ö֪ͨ ¸Ã ºÎʱִÐÐ µÄÒ»×éÁ¬½Óµã¡£Í¨¹ýÇÐÈëµã£¬ÎÒÃÇ¿ÉÒÔ¾«È·µÄ¿ØÖƳÌÐòÖÐʲô×é¼þ½Óµ½Ê²Ã´Í¨Öª¡£
4.·½Ãæ
֪ͨºÍÇÐÈëµãµÄ×éºÏ½Ð·½Ãæ¡£
5.Ä¿±ê
Êܵ½AOP²Ù×÷µÄ¶ÔÏó
6.Ö¯Èë
½«·½Ãæ¼ÓÈë³ÌÐòµÄ¹ý³Ì
7. ÒýÈë
ͨ¹ý¿ÉÒÔÈÃÒ»¸ö¶ÔÏóÖмÓÈëеķ½·¨ºÍÊôÐÔ
¶þ¡¢IOC£¨inversion of control£©¿ØÖÆ·´×ªÓëDI(ÒÀÀµ×¢Èë)
1.À©Õ¹ÐÔ
2.¼õÉÙñîºÏ
Spring IOC ÈÝÆ÷ ¹ÜÀíÎÒÃǵĶÔÏó£¬ÒÔ¼°¶ÔÏóÖ®¼äµÄÒÀÀµ¹Øϵ¡£
¶þ¡¢AOP
¶¯Ì¬´úÀí
¾²Ì¬´úÀí
ÈçºÎʹÓà Java ¶¯Ì¬´úÀí¡£¾ßÌåÓÐÈçÏÂËIJ½Ö裺
1 ͨ¹ýʵÏÖ InvocationHandler ½Ó¿Ú´´½¨×Ô¼ºµÄµ÷Óô¦ÀíÆ÷£»
2 ͨ¹ýΪ Proxy ÀàÖ¸¶¨ ClassLoader ¶ÔÏóºÍÒ»×é interface À´´´½¨¶¯Ì¬´úÀíÀࣻ
3 ͨ¹ý·´Éä»úÖÆ»ñµÃ¶¯Ì¬´úÀíÀàµÄ¹¹Ô캯Êý£¬ÆäΨһ²ÎÊýÀàÐÍÊǵ÷Óô¦ÀíÆ÷½Ó¿ÚÀàÐÍ£»
4 ͨ¹ý¹¹Ô캯Êý´´½¨¶¯Ì¬´úÀíÀàʵÀý£¬¹¹Ôìʱµ÷Óô¦ÀíÆ÷¶ÔÏó×÷Ϊ²ÎÊý±»´«Èë¡£
Á¬½Óµã£º¾ÍÊÇÒªÖ´Ðеĵط½¡£Join point
Ö¯È룬¾ÍÊǽ«Í¨ÖªÓ¦¸Ãµ½Á¬½ÓµãµÄ¹ý³Ì¡£
֪ͨ£ºÖ´ÐÐÇ°£¬Ö´Ðкó,·µ»Øºó£¬Òì³£Å׳öºóµÈ¡£
ÇÐÈëµã£ºÔ¼¶¨Ò»¸ö·¶Î§£¬adviceÄÜÔËÓõ½ÄÇЩjoin point 
Ïà¹ØÎĵµ£º
Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......
XFire VS Axis
XFireÊÇÓëAxis2 ²¢ÁеÄÐÂÒ»´úWebServiceƽ̨¡£Ö®ËùÒÔ²¢³ÆΪÐÂÒ»´ú£¬ÒòΪËü£º
1¡¢Ö§³ÖһϵÁÐWeb ServiceµÄбê×¼--JSR181¡¢WSDL2.0 ¡¢JAXB2¡¢WS-SecurityµÈ£»
2¡¢Ê¹ÓÃStax½âÊÍXML,ÐÔÄÜÓÐÁËÖʵÄÌá¸ß¡£XFire²ÉÓÃWoodstox ×÷StaxʵÏÖ£»
3¡¢ÈÝÒ×ÉÏÊÖ£¬¿ÉÒÔ·½±ã¿ìËٵشÓpojo·¢²¼·þÎñ£»
4¡¢Sprin ......
תÔØÇë×¢Ã÷:À´×Ôhttp://blog.csdn.net/M_ChangGong/ ×÷Õß:ÕÅÑà¹ã
JavaʵÏÖMD5¼ÓÃÜÒÔ¼°½âÃÜÀ࣬¸½´ø²âÊÔÀ࣬¾ßÌå¼û´úÂë¡£
MD5¼ÓÃܽâÃÜÀà——MyMD5Util,´úÂëÈçÏ£º
package com.zyg.security.md5;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import ja ......
1. »·¾³±äÁ¿µÄÅäÖãºpathºÍclasspathÖ¸Ïòjava/binĿ¼Ï£»
2. javaÓïÑÔµÄÌص㣺¿ÉÒÆÖ²£¬ÃæÏò¶ÔÏ󣬷ֲ¼ÐÔ£¬½¡×³ÐÔ£¬°²È«ÐÔ£¬¼òµ¥ÐÔ£¬¸ßÐÔÄÜ£¬¶àỊ̈߳¬¶¯Ì¬ÐÔ¡£
3. Êý¾ÝÀàÐÍ£º
ÕûÐÍ£º×Ö½ÚÐÍ£¨byte 1×Ö½Ú£© ¶ÌÕûÐÍ£¨short 2×Ö½Ú£© »ù±¾ÐÍ£¨int 4×Ö½Ú£© ³¤ÕûÐÍ£¨long 8×Ö½Ú£©£»
¸¡µãÐÍ£ºµ¥¾«¶È¸ ......
java.util.RandomÀàÓÐÁ½ÖÖ·½Ê½¹¹½¨·½Ê½£º´øÖÖ×ӺͲ»´øÖÖ×Ó
1.²»´øÖÖ×Ó
package testjava01;
public class Random {
public static void main(String[] args) {
java.util.Random r = new java.util.Random();
for(i ......