文章列表
threadlocal使用
- 博客分类:
- java
public class ThreadProperty{
private static ThreadLocal<Map<String, Object>> threadProperty= new ThreadLocal<Map<String, Object>>() {
protected synchronized Map<String, Object> initialValue() {
return new Has ...
- 2009-04-19 20:18
- 浏览 968
- 评论(0)
框架部分
public abstract class ApplicationContext {
public abstract Object getBean(String id);
}
public class BeanDefinetion {
private String id;
private String type;
private List<PropertyDefinition> propertyDefinitions=new ArrayList<PropertyDefinition>();
public ...
- 2009-03-14 23:30
- 浏览 1021
- 评论(0)
课堂上讲课时写的一个简单的仿struts2框架
package intecerptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import struts.Action;
/**
*
* @author Administrator
*/
public interface ActionInvocation {
public Action getAction() ;
public String invoke() throws Exc ...
- 2009-03-14 23:00
- 浏览 1593
- 评论(0)
Interceptor的实现
- 博客分类:
- java
public interface Action {
public String execute() throws Exception;
}
public class TestAction implements Action {
public String execute() throws Exception {
System.out.println("action exe");
return "success";
}
}
public interface Interceptor {
public ...
- 2009-03-01 17:28
- 浏览 815
- 评论(0)