質問編集履歴
1
必要な文章の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -44,4 +44,18 @@
|
|
44
44
|
|
45
45
|
### 補足情報(FW/ツールのバージョンなど)
|
46
46
|
|
47
|
-
org.springframework.boot 2.5.2
|
47
|
+
org.springframework.boot 2.5.2
|
48
|
+
|
49
|
+
|
50
|
+
### 調べてみて
|
51
|
+
|
52
|
+
下記に解決方法みたいなのが書いてありますが
|
53
|
+
下記方法以外ないのでしょうか
|
54
|
+
できれば@Autowiredで実現したいです
|
55
|
+
|
56
|
+
> AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ApplicationConfiguration.class);
|
57
|
+
> String helloCat = (String) context.getBean("hello", "Cat");
|
58
|
+
> String helloDog = (String) context.getBean("hello", "Dog");
|
59
|
+
|
60
|
+
コンストラクタに引数が必要なクラスのDIについて
|
61
|
+
https://teratail.com/questions/66194
|