0
我的英文不好。请理解..弹簧动态构造函数值
//This is my Spring-mvc-based Controller
@Controller
public class DownloadManageController {
private DownloadManageService downService;
@Autowired
public void setPackService(DownloadManageService downService) {
this.downService = downService;
}
}
//This is my Spring-Bean which should have a dynamic value of contructor
Component
public class DownloadManageService {
private Log log = LogFactory.getLog(DownloadManageService.class);
private FileAccessObject downloadFileAccessObj = null;
DownloadManageService(String downloadInfoFile) {
this.downloadFileAccessObj = new FileAccessObjectImpl(
"d:/dat/download/" + downloadInfoFile);
}
}
当服务注入到控制器......我想打downloadInfoFile
变量的动态取决于请求参数。
谢谢你的回答~~好帮手 – jeon 2012-03-09 16:31:01