@Component
public class ExpressOrderThreeSectionsCodeTask implements Callable {
private String orderNo;
private String countryCode;
private String provinceName;
private String cityName;
private String districtName;
private String address;
@Autowired
private IExpressOrderApiService expressOrderApiService;
public ExpressOrderThreeSectionsCodeTask(String orderNo, String countryCode, String provinceName,
String cityName, String districtName, String address) {
this.orderNo = orderNo;
this.countryCode = countryCode;
this.provinceName = provinceName;
this.cityName = cityName;
this.districtName = districtName;
this.address = address;
}
...
}
代码如上,当我使用了 @Component 注解时 为什么 ExpressOrderThreeSectionsCodeTask 这个构造函数会报错,被 Spring 管理的类不能有自己的私有属性或者构造函数嘛?