My English is not good. Please understand..
//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);
}
}
When Service inject into controller... I'd like to make downloadInfoFile variable dynamic depends on a request parameter.