私は以下の構成で、春のブートアプリケーションを実行している増加春のブートプロパティのリストのデフォルトサイズ
@ConfigurationProperties(prefix= "app.sample")
@Component
public class PropGenerator{
private List<String> list;
public List<String> getList() {
return list;
}
public void setList(List<String> list) {
this.list = list;
}
}
私application.properties
は
app.sample.list以下の形式で構成された300個のエントリを持っています[0] =値1 。 。
app.sample.list [299] = value300
私はプログラムを実行すると、私は
Invalid list index in property path 'list[279]'; nested exception is java.lang.IndexOutOfBoundsException: Index: 279, Size: 251
Caused by: java.lang.IndexOutOfBoundsException: Index: 279, Size: 251
ように、すべての300どのように私は手動でリストのサイズを上書きすることができ、以下のエラーが出ます値はlist
変数に自動入力されていますか?私は@InitBinderに出くわしましたが、動作させることができませんでした。