回答編集履歴

1

内容の誤り修正、誤字修正

2021/07/27 18:06

投稿

kiino
kiino

スコア539

test CHANGED
@@ -52,7 +52,9 @@
52
52
 
53
53
 
54
54
 
55
- クラスにバインドしたい場合、
55
+ クラスにバインドしたい場合、以下の手順で追加できます
56
+
57
+ `org.springframework.boot:spring-boot-configuration-processor` をビルドツールの設定に追加する。
56
58
 
57
59
  SpringBoot の `Application` class に `@ConfigurationPropertiesScan` を付与する。
58
60
 
@@ -92,15 +94,15 @@
92
94
 
93
95
  public class SampleConfig {
94
96
 
95
- private final String cfvFile;
97
+ private final String csvFile;
96
98
 
97
99
  private final int timeout;
98
100
 
99
101
 
100
102
 
101
- public SampleConfig(String cfvFile, int timeout) {
103
+ public SampleConfig(String csvFile, int timeout) {
102
104
 
103
- this.cfvFile = cfvFile;
105
+ this.csvFile= csvFile;
104
106
 
105
107
  this.timeout = timeout;
106
108
 
@@ -126,7 +128,7 @@
126
128
 
127
129
  public ConfigRepositoryImpl(SampleConfig config) {
128
130
 
129
- cfvFilePath = config.getCfvFile();
131
+ cfvFilePath = config.getCsvFile();
130
132
 
131
133
  this.timeout = config.getTimeout();
132
134