Я получаю следующее сообщение об ошибке:ошибка Java-весна: Фактические и формальный аргумент различаются по длине
Error:constructor Commonctx in class CommonCtx cant be applied to given types; required: org.springframework.core.env.Environment found:no arguments reason: actual and formal argument lists differ in length.
код который используется:
@Component
@PropertySource("file:${input.file.loc}")
public class CommonCtx implements IContext {
private String tempDir;
@Autowired
public CommonCtx(Environment inputProperties) {
tempDir = inputProperties.getProperty("temp.dir");
...
}
@Component
@Conditional(cond1.class)
@PropertySource("file:${input.file.loc}")
public class NewCCtx extends CommonCtx implements NewCContext{
private String productName;
/**
* @param inputProperties
*/
@Autowired
public NewCCtx(Environment inputProperties) {
this.productName = inputProperties.getProperty("product.name");
}
Большое спасибо за помощь! – user1731553
Добро пожаловать, рад помочь. :) –