摘要:
1.ThreadLocal仿代码package com.tazi.aop;import java.util.Collections; import java.util.HashMap; import java.util.Map;public class MyThreadLocal<T> { private Map<Thread,T> values=Collections.synchronizedMap(new HashMap<Thread,T>()); public T get(){ Thread thread=Thread.currentThread(); 阅读全文
posted @ 2012-01-04 09:25
tazi
阅读(273)
评论(0)
推荐(0)
摘要:
1.odbc方式2.jdbc驱动包方式public static void main(String[] args) { try { //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Class.forName("oracle.jdbc.driver.OracleDriver"); //Connection con=DriverManager.getConnection("jdbc:odbc:scott", "scott", "123456"); C 阅读全文
posted @ 2012-01-04 09:23
tazi
阅读(157)
评论(0)
推荐(0)
摘要:
1.加上Context命名空间xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation加上http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"2.要使用注解方式,进行依赖注入。要加上@Resource等注解的解析器<context:annotation-config/>3.要 阅读全文
posted @ 2012-01-04 09:22
tazi
阅读(862)
评论(0)
推荐(0)
摘要:
使用Hibernate 1.Hibernate核心包 hibernate-distribution-3.31.GA hibernate3.jar lib/bytecode/cglib/hiber... 阅读全文
posted @ 2012-01-04 09:21
tazi
阅读(355)
评论(2)
推荐(0)
浙公网安备 33010602011771号