0
autowiredオブジェクトとして注入される別のクラスのコンストラクタに動的値を渡す方法はありますか?私はSample
クラスからTest
クラスのコンストラクタに値を渡すことができますどのようにautowiredオブジェクトとして注入された別のクラスのコンストラクタに動的値を渡す方法
@Service
Class Test {
int a;
String b;
public Test(int a, String b) {
this.a = a;
this.b = b;
}
}
Class Sample {
@Autowired
Test test;
}
?