ÿ¸öÏîÄ¿ÖУ¬Äã²»µÃ²»ÖªµÄ11¸öJavaµÚÈý·½Àà¿â
JavaµÚÈý·½library ecosystemÊÇÒ»¸öºÜ¹ãÀ«µÄ·¶³ë¡£²»¾ÃÇ°ÓÐÈË׫ÎÄ£ºÃ¿¸öÏîÄ¿ÖУ¬Äã±ØÐëÖªµÀµÄ11¸öJavaµÚÈý·½Àà¿â¡£
µ¥Ôª²âÊÔ
1.DBUnit
DBunitÊÇÒ»¸ö»ùÓÚjunitÀ©Õ¹µÄÊý¾Ý¿â²âÊÔ¿ò¼Ü¡£ËüÌṩÁË´óÁ¿µÄÀà¶ÔÓëÊý¾Ý¿âÏà¹ØµÄ²Ù×÷½øÐÐÁ˳éÏóºÍ·â×°¡£
2.MOckito
MockitoÊÇÒ»¸öÕë¶ÔJavaµÄmocking¿ò¼Ü¡£Äã¿ÉÒÔʹÓüò½àµÄAPI±àд³öƯÁÁµÄ²âÊÔ¡£
3.Hamcrest Matchers
Hamcrest ÊÇÒ»¸ö²âÊÔ¸¨Öú¹¤¾ß£¬ÌṩÁËÒ»Ì×ͨÓõÄÆ¥Åä·û Matcher£¬Áé»îʹÓÃÕâЩƥÅä·û¶¨ÒåµÄ¹æÔò£¬³ÌÐòÔ±¿ÉÒÔ¸ü¼Ó¾«È·µÄ±í´ï×Ô¼ºµÄ²âÊÔ˼Ï룬ָ¶¨ËùÏëÉ趨µÄ²âÊÔÌõ¼þ¡£
Junit4½áºÏHamcrestÌṩÁËеĶÏÑÔÓï¾ä-assertThat£¬Ö»ÐèÒ»¸öassertThatÓï¾ä£¬½áºÏHamcrestÌṩµÄÆ¥Åä·û£¬¾Í¿ÉÒÔ±í´ïÈ«²¿µÄ²âÊÔ˼Ïë¡£
Apache Commons
4.Configuration
Õâ¸ö¹¤¾ßÊÇÓÃÀ´°ïÖú´¦ÀíÅäÖÃÎļþµÄ£¬Ö§³ÖºÜ¶àÖÖ´æ´¢·½Ê½
5.DbUtils
DbUtils¿ÉÒÔ½«Êý¾Ý¿â²Ù×÷µ¥¶À×ö³ÉÒ»¸ö°ü£¬¼ò»¯Êý¾Ý¿â²Ù×÷¡£
6.IO
¿ÉÒÔ¿´³ÉÊÇjava.ioµÄÀ©Õ¹¡£ËüÌṩÁËÎļþÔĶÁ¹¦ÄÜ£¬ÒÔ¼°Ò»Ð©Ê¹Óõķ½·¨£¬ÀàËÆÓÚDbUtils¡£
7.Lang
Èç¹ûÄãÒªÎÊÎÒ»¹ÓÐÄĸö¿âÒ»»áÔÚ´ËÃûµ¥Ö®ÉÏ£¬ÎÒ»á¸æËßÄãÊÇLang»òÕßgoogle Collections¡£lang¿ÉÒÔ¿´³ÉÊǶÔjava.langµÄÀ©Õ¹£¬ÌṩÁËÖîÈçStringUtils, StringEscapeUtils, RandomStringUtils, Tokenizer, WordUtilsµÈ¹¤¾ßÀà¡£
ºóÆðÖ®Ðã
8.SLF4J
SLF4JÊÇΪ¸÷ÖÖloging APIsÌṩһ¸ö¼òµ¥Í³Ò»µÄ½Ó¿Ú£¬´Ó¶øʹµÃ×îÖÕÓû§Äܹ»ÔÚ²¿ÊðµÄʱºòÅäÖÃ×Ô¼ºÏ£ÍûµÄloging APIsʵÏÖ¡£Slf4jÀàËÆÓÚApache Common-LoggingºÍLog4J£¬µ«Slf4j±ÈËüÃǶ¼ÒªÓÅÐã¡£
9.Google Collections
JavaµÄ¼¯ºÏ¿ò¼ÜÊÇJavaÀà¿âµ±ÖÐʹÓÃƵÂÊ×î¸ßµÄ²¿·ÖÖ®Ò»£¬¶øGoogle Collections¿âÊÇÓÉGoogle»ùÓÚJava5.0 Collections Framework¿ª·¢µÄÒ»Ì×еÄJava¼¯ºÏ¿ò¼Ü£¬ÌṩһЩ¸ß¼¶¼¯ºÏ²Ù×÷µÄAPI¡£
10.c3p0
C3P0ÊÇÒ»¸öËæHibernateһͬ·Ö·¢µÄ¿ªÔ´µÄJDBCÁ¬½Ó³Ø£¬ ËüλÓÚlibĿ¼Ï¡£ °üÀ¨ÁËʵÏÖjdbc3ºÍjdbc2À©Õ¹¹æ·¶ËµÃ÷µÄConnection ºÍStatement ³ØµÄDataSources ¶ÔÏó¡£
11.Joda Time
Joda TimeÊÇÒ»¸öÇ¿´óÒ×ÓõÄÈÕÆÚºÍʱ¼ä¿â£¬¿ÉÒÔÍêÈ«È¡´úJDKDateºÍCalendarÀà¡£
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
java exception ½â¾ö·½°¸ - ÎÒµÄÒì³£Íø|Òì³£|exception 770 - java.net.unknownhostException 771 - com.ibatis.struts.BeanActionException 772 - javax.servlet.jsp.JspException:Cannot find bean under name org.apache.struts.taglib.html.BEAN 773 - java.lang.NoClassDefFoundError:org apache commons lang Unhand ......
½Ì³Ì5 ËãÊýÔËËãѧϰ³ÌÐò ѧϰĿ±ê 5.1¼òµ¥¼Ó·¨Ñ§Ï°³ÌÐò СѧÉúÔÚ¸Õ¸Õ¿ªÊ¼Ñ§Ï°ÊýѧÔËËãµÄʱºò£¬ÐèÒª²»¶ÏµØ½øÐз´¸´´óÁ¿µÄÁ·Ï°£¬²ÅÄܹ»Ñ¸ËÙÕÆÎÕÕⲿ·ÖÄÚÈÝ¡£ÏÂÃ濪·¢Ò»¸ö¼òµ¥µÄ¼Ó·¨Ñ§Ï°³ÌÐò£¬Äܹ»²úÉú¼Ó·¨ÔËËãÈÃѧÉúÀ´Ñ§Ï°Ìá¸ß¡£ ±àд³ÌÐòÈçÏ£º 1 package lesson5; 2 3 public class Operation1 { 4 int number1; 5 ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍøÕ ......
Éè¼ÆÒ»¸öCircleÀ࣬ÆäÊôÐÔΪԵ㣨ÀàÐÍΪÀàMyPoint£©ºÍ°ë¾¶£¬²¢Îª´ËÀà±àдÒÔÏÂÈý¸ö·½·¨£º
Ò»¡¢¼ÆËãÔ²µÄÃæ»ýµÄcalArea£¨£©·½·¨£»
¶þ¡¢¼ÆËãÖܳ¤µÄcalLength£¨£©·½·¨£»
Èý¡¢boolean inCircle£¨MyPoint mp£©·½·¨£¬¹¦ÄÜÊDzâÊÔ×÷Ϊ²ÎÊýµÄij¸öµãÊÇ·ñÔÚµ±Ç°¶ÔÏóÔ²ÄÚ£¨Ô²ÄÚ£¬°üÀ¨Ô²ÉÏ·µ»Øtrue£¬ÔÚÔ²Íâ·µ»Øfalse£©¡£
³ÌÐò£º
clas ......