@Override public void afterPropertiesSet() throws Exception { if (ftpClient == null) { ftpClient = new FTPClient(); } ftpClient.configure(config); ftpClient.addProtocolCommandListener( new ProtocolCommandListener() { @Override public void protocolCommandSent(ProtocolCommandEvent event) { log.info("Send FTP command: " + event.getCommand()); } @Override public void protocolReplyReceived(ProtocolCommandEvent event) { log.info("Received FTP command reply: " + event.getReplyCode()); } }); }