Thread是论坛主题的领域对象,一个论坛主题对应一个主帖,并拥有多个跟帖,为了简单,这里仅保留主贴对象topic,Topic领域对象类如下所示:package com.baobaotao.configure;
import java.io.Serializable;
import org.springframework.beans.factory.annotation.Configurable;
@Configurable ①
public class Thread implements Serializable...{
private String title;
private Topic topic;
//get/setter
public String toString()...{
return "title:"+title+";\ntopic:"+topic;
}
}
package com.baobaotao.configure;
import java.io.Serializable;
import org.springframework.beans.factory.annotation.Configurable;
@Configurable ①
public class Topic implements Serializable...{
private String title;
private String content;
//get/setter
public String toString()...{
return "title:"+title+";content:"+content;
}
}
| 第1页: 如何使用AspectJ LTW | 第2页: 配置LTW织入器的aop.xml织入配置文件 |
| 第3页: 让Spring管理容器外的对象 | 第4页: 文件配置 |
| 第5页: 领域对象的信息 |