如果我想在apache-camel中使用ftp自定义组件,如何将ftp uri参数设置为ftpConfiguration?我尝试使用Uri param注释来获取uri参数但失败了。有没有人有想法?以下是我的示例代码:
public class FtpConfigurationExt extends FtpConfiguration {
private static final Logger LOGGER = LoggerFactory.getLogger(FtpConfigurationExt.class);
@UriParam(name = "ftpCommands")
private String ftpCommands;
public FtpConfigurationExt() {
super();
}
public FtpConfigurationExt(URI uri) {
super(uri);
setProtocol("ftp");
}
public String getFtpCommands() {
return ftpCommands;
}
public void setFtpCommands(String ftpCommands) {
LOGGER.info(" FtpConfigurationExt ftpCommands : " + ftpCommands);
this.ftpCommands = ftpCommands;
}
}