Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA Á¬½Ó³Ø BoneCP ²âÊÔ£¨2£© with spring 3

¶îÍâJAR°ü£º
org.springframework.expression-3.0.1.RELEASE.jar
org.springframework.asm-3.0.1.RELEASE.jar
org.springframework.beans-3.0.1.RELEASE.jar
p:statementCacheSize="100"
<bean id="masterDataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"
p:driverClass="com.mysql.jdbc.Driver" 
p:jdbcUrl="jdbc:mysql://localhost/pesdog?autoReconnectForPools=true&amp;autoReconnect=true&amp;characterEncoding=utf-8" 
p:username="root" p:password="" 
p:idleConnectionTestPeriod="60" p:idleMaxAge="240"
p:maxConnectionsPerPartition="30" p:minConnectionsPerPartition="10"
p:partitionCount="3" p:acquireIncrement="5" 
p:releaseHelperThreads="3"
/>
<context:annotation-config/><bean id="foo" class="test.Foo">
</bean>
public static void main(String[] args){
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

Foo foo = (Foo)context.getBean("foo");


try{
foo.test();
}catch(Exception ex){
ex.printStackTrace();
}


}
@Component
public class Foo {
// @Autowired
private DataSource masterDataSource;
public DataSource getMasterDataSource() {
return masterDataSource;
}
@Required
@Autowired
public void setMasterDataSource(DataSource masterDataSource) {
this.masterDataSource = masterDataSource;
}

public void test() throws Exception{
Connection cn = this.masterDataSource.getConnection();
Statement stmt = cn.createStatement();

String sql = "select username,loginid from sys_user";

System.out.println(sql);
ResultSet rs = stmt.executeQuery(sql);
while(rs.next()){
System.out.println(rs.getString("username"));
System.out.println(rs.getString("loginid"));
}
}

}


Ïà¹ØÎĵµ£º

java ¶¯Ì¬´úÀí


1¡¢Ê×ÏȱØÐëÓиö½Ó¿Ú
package reflection;
public interface HelloWorld {
    void sayHelloWorld();
    void testHello(String hello);
}
2¡¢½Ó¿ÚµÄʵÏÖÀà
package reflection;
public class HelloWorldImpl implements HelloWorld {
 public void sayHelloWorld() {
&n ......

java»ù´¡»Ø¹Ë ·â×°¼Ì³Ð¶à̬


ÃæÏò¶ÔÏó±à³ÌÓÐÈý¸öÌØÕ÷£¬¼´·â×°¡¢¼Ì³ÐºÍ¶à̬¡£
    ·â×°Òþ²ØÁËÀàµÄÄÚ²¿ÊµÏÖ»úÖÆ£¬´Ó¶ø¿ÉÒÔÔÚ²»Ó°ÏìʹÓÃÕßµÄÇ°ÌáϸıäÀàµÄÄÚ²¿½á¹¹£¬Í¬Ê±±£»¤ÁËÊý¾Ý¡£
    ¼Ì³ÐÊÇΪÁËÖØÓø¸Àà´úÂ룬ͬʱΪʵÏÖ¶à̬ÐÔ×÷×¼±¸¡£ÄÇôʲôÊǶà̬ÄØ£¿
    ·½·¨µÄÖØд¡¢ÖØÔØÓë ......

Flex+LCDS+Java ʵ¼ù£¨Ò»£© ÓÎÏ·´óµØͼ±³¾°ÖÆ×÷

Ç°ÑÔ£º
±¾ÏîÄ¿Ö÷ÒªÊÇͨ¹ý°ÑµØͼÇÐƬǶÈëswf£¬°ÑÇÐƬ×ø±êÓÃJavaÊý¾Ý´ò°ü£¬È»ºó ÔÚFlexÏîÄ¿ÄÚͨ¹ýJava¶ÁÈ¡´ò°üÊý¾Ý£¬Í¨Ñ¶¸øFlex£¬×îºó°ÑswfÄÚµÄͼƬ°²·ÅÔÚ¶ÔӦλÖÃÀ´Êµ´óµØͼ ²ð·Ö->´ò°ü->ÔÙÏֵĹý³Ì¡£
1.  swfͼƬ´ò°ü´úÂë BitMapClass.as
package
{
import flash.display.Sprite;

public class BitM ......

Java IO InputStreamReader

      ºÜ¶àµÄÎı¾Îļþ»áÓв»Í¬µÄ±àÂë¸ñʽ£¬Ôì³ÉÕâÖÖ±àÂë²îÒìµÄ¿ÉÄÜÊÇϵͳµÄ²îÒ죬¿ÉÄÜÊÇÔÚ±£´æÎļþʱ²ÉÓÃÌض¨µÄ×Ö·û¼¯±àÂëÀ´±£´æ¡£ÕâʱÎÒÃÇÀûÓÃJavaÓïÑÔÀ´´ò¿ªÕâЩÎı¾Ê±£¬Èç¹û²»Ê¹ÓÃÕýÈ·µÄ×Ö·û¼¯½âÂëÆ÷´ò¿ª£¬¿Ï¶¨»á³öÏÖÂÒÂë¡£ºÃÔÚjava.io°üÌṩÁËÒ»¸öjava.io.InputStreamReaderÀàÀ´Ö§³ÖÖ¸¶¨Îı¾× ......

javaÅжÏ×ÓÍøÑÚÂë

String[] ips = ipValue.split("\\.");
String binaryVal = "";
for (int i = 0; i < ips.length; i++)
{
String binaryStr = Integer.toBinaryString(Integer.parseInt(ips[i]));


Integer times = 8 - binaryStr.length();
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ