我有这个简单的Spring服务:
@Service
public class BinCountryCheckFilterImpl {
@Autowired
private RiskFilterService riskFilterService;
private Terminals terminal;
@Autowired
public BinCountryCheckFilterImpl(Terminals terminal) {
this.terminal = terminal;
}
}
我想从这里致电服务
@Service
public class FilterProcessing {
@Autowired
private BinCountryCheckFilterImpl binCountryCheckFilter;
public PaymentResponse someMetohd(Terminals terminal,
PaymentTransaction message, HttpServletRequest request) throws JAXBException, JsonProcessingException {
switch(.......) {
case ".......":
// send here the args via Contructor
binCountryCheckFilter.validateBinCountryCheckFilter(terminal);
break;
case ".........":
.........
break;
break;
}
}
return null;
}
}
但是我不知道如何通过terminal
构造函数发送对象BinCountryCheckFilterImpl
。
有解决方案吗?