ism*_*ael 4 spring spring-boot
运行 Spring Boot 应用程序
描述:
Car 中构造函数的参数 0 需要一个类型为“java.lang.String”的 bean,但无法找到
@Component
public class Car implements Driver {
private String name;
private int color;
@Autowired
public Car(String name, int color) {
this.name = name;
this.color = color;
}
@Override
public void close() {
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30901 次 |
| 最近记录: |