JAVAÁ¬½Ó³Ø
package com.xinnuo.jdbc;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Date;
/*
* ¸ÃÀàÖ»ÄÜ´´½¨Ò»¸öʵÀý£¬ÆäËü¶ÔÏóÄܹ»µ÷ÓÃÆ侲̬·½·¨£¨Ò²³ÆΪÀà·½·¨£©»ñµÃ¸ÃΨһʵÀýµÄÒýÓá£
* DBConnectionManagerÀàµÄ½¨¹¹º¯ÊýÊÇ˽Óеģ¬ÕâÊÇΪÁ˱ÜÃâÆäËü¶ÔÏó´´½¨¸ÃÀàµÄʵÀý.
* DBConnectionManagerÀàµÄ¿Í»§³ÌÐò¿ÉÒÔµ÷ÓÃgetInstance()·½·¨»ñµÃ¶Ô¸ÃÀàΨһʵÀýµÄÒýÓá£
* ÀàµÄΨһʵÀýÔÚgetInstance()·½·¨µÚÒ»´Î±»µ÷ÓÃÆڼ䴴½¨£¬´ËºóÆäÒýÓþÍÒ»Ö±±£´æÔÚ¾²Ì¬±äÁ¿
* instanceÖС£Ã¿´Îµ÷ÓÃgetInstance()¶¼Ôö¼ÓÒ»¸öDBConnectionManagerµÄ¿Í»§³ÌÐò¼ÆÊý¡£
* ¼´£¬¸Ã¼ÆÊý´ú±íÒýÓÃDBConnectionManagerΨһʵÀýµÄ¿Í»§³ÌÐò×ÜÊý£¬Ëü½«±»ÓÃÓÚ¿ØÖÆÁ¬½Ó³ØµÄ
* ¹Ø±Õ²Ù×÷¡£ ¸ÃÀàʵÀýµÄ³õʼ»¯¹¤×÷˽Óз½·¨init()Íê³É¡£ÆäÖÐ getResourceAsStream()·½·¨
* ÓÃÓÚ¶¨Î»²¢´ò¿ªÍⲿÎļþ¡£ÍⲿÎļþµÄ¶¨Î»·½·¨ÒÀÀµÓÚÀà×°ÔØÆ÷µÄʵÏÖ¡£±ê×¼µÄ±¾µØÀà×°ÔØÆ÷²éÕÒ²Ù
* ×÷×ÜÊÇ¿ªÊ¼ÓÚÀàÎļþËùÔÚ·¾¶£¬Ò²Äܹ»ËÑË÷CLASSPATHÖÐÉùÃ÷µÄ·¾¶¡£db.propertiesÊÇÒ»¸öÊôÐÔ
* Îļþ£¬Ëü°üº¬¶¨ÒåÁ¬½Ó³ØµÄ¼ü-Öµ¶Ô¡£¿É¹©¶¨ÒåµÄ¹«ÓÃÊôÐÔÈçÏ£º
* drivers ÒÔ¿Õ¸ñ·Ö¸ôµÄJDBCÇý¶¯³ÌÐòÀàÁбí\\
* logfile ÈÕÖ¾ÎļþµÄ¾ø¶Ô·¾¶
* ÆäËüµÄÊôÐÔºÍÌض¨Á¬½Ó³ØÏà¹Ø£¬ÆäÊôÐÔÃû×ÖÇ°Ó¦¼ÓÉÏÁ¬½Ó³ØÃû×Ö£º
* < poolname>.url Êý¾Ý¿âµÄ JDBC URL
* < poolname>.maxconn ÔÊÐí½¨Á¢µÄ×î´óÁ¬½ÓÊý£¬0±íʾûÓÐÏÞÖÆ
* < poolname>.user ÓÃÓÚ¸ÃÁ¬½Ó³ØµÄÊý¾Ý¿âÕʺÅ
* < poolname>.password ÏàÓ¦µÄÃÜÂë\\
* ÆäÖÐurlÊôÐÔÊDZØÐèµÄ£¬¶øÆäËüÊôÐÔÔòÊÇ¿ÉÑ¡µÄ¡£Êý¾Ý¿âÕʺźÍÃÜÂë±ØÐëºÏ·¨¡£ÓÃÓÚWindowsƽ̨µÄ
* db.propertiesÎļþʾÀýÈçÏ£º
* drivers=com.microsoft.jdbc.sqlserver.SQLServerDriver
* logfile=D:\\log.txt
* access.maxconn=20
* access.url=jdbc:microsoft:sqlserver://localhost:1433;databasename=web
* access.user=sa
* access.passw
Ïà¹ØÎĵµ£º
×÷ÓÃÓò ¹¦ÄÜ ¿ì½Ý¼ü
Îı¾±à¼Æ÷ ²éÕÒÉÏÒ»¸ö Ctrl+Shift+K
Îı¾±à¼Æ÷ ²éÕÒÏÂÒ»¸ö Ctrl+K
È«¾Ö »Ö¸´ÉÏÒ»¸öÑ¡Ôñ Alt+Shift+↓
È«¾Ö ¿ìËÙÐÞÕý Ctrl1+1
È«¾Ö ÄÚÈݸ¨Öú Alt+/
È«¾Ö ÉÏÏÂÎÄÐÅÏ¢ Alt+£¿
Alt+Shift+?
Ctrl+Shift+Space
Java±à¼Æ÷ ÏÔʾ¹¤¾ßÌáʾÃèÊö F2
Java±à¼Æ÷ Ñ¡Ôñ·â×°ÔªËØ Alt+Shi ......
from: http://mmblue.javaeye.com/blog/511915
package org.mmblue.common.util;
import java.util.List;
public class PageModel<T> {
// ......
Ò»¡¢Java»ù´¡ÖªÊ¶
1.JavaÓÐÄÇЩ»ù±¾Êý¾ÝÀàÐÍ£¬StringÊDz»ÊÇ»ù±¾Êý¾ÝÀàÐÍ£¬ËûÃÇÓкÎÇø±ð¡£
2.×Ö·û´®µÄ²Ù×÷£º
дһ¸ö·½·¨£¬ÊµÏÖ×Ö·û´®µÄ·´×ª£¬È磺ÊäÈëabc£¬Êä³öcba
дһ¸ö·½·¨£¬ÊµÏÖ×Ö·û´®µÄÌæ»»£¬È磺ÊäÈëbbbwlirbbb£¬Êä³öbbbhhtccc¡£
3.Êý¾ÝÀàÐÍÖ®¼äµÄת»»
ÈçºÎ½«ÊýÖµÐÍ×Ö·ûת»»ÎªÊý×Ö£¨ ......
ÁªÍ¨£º³¹µ×·ÅÆúORÓûÇܹÊ×Ý£¿
ÒµÄÚÈÕÇ°´«³öÏûÏ¢£¬ÓÉÓÚÆ»¹û¼á³Ö·Ö³Éģʽ£¬ÁªÍ¨¸ß²ã¶ÔÓÚÒýÈëÆ»¹û̬¶ÈÒÑÎÞÔçÏȼá¾ö¡£“Ëæ×ÅÊÖ»úµÄ²»¶Ï¸üл»´ú£¬Ò»µãÓпÉÄÜ°üº¬µÄ¹¦ÄÜÌرðÊÇÁªÍ¨¼ÓÈë¹È¸è¿ª·ÅÊÖ»úÁªÃË£¬ÔÚÊý¾Ý±£»¤ºÍ¼á¹ÌÐ×÷¼Æ»®ÍÆ×ÔÓпª·Å²Ù×÷ƽ̨ÊÖ»ú£¬ÔÚÊý¾Ý±£»¤ºÍ¼á¹ÌÐ×÷ javaµç×ÓÊéÃâ·ÑÏÂÔØiPhoneÔÚÆäÕ½ÂÔÖ ......
2009-11-23
Ö§³Ö³£¼ûµÄÊý¾ÝÀàÐ͵ÄÓ³Éä Java ÀàÐÍ C ÀàÐÍ & ......