I have an application (springboot 2) where customer would like to edit integer value, which represents value for maximum of AutoGrowCollectionLimit. This value is by default (according to spring docs) set to 256 and this is not enough for our purposes.
The code, where the property is set:
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setAutoGrowCollectionLimit([configurable_number]);
}
This value should be configurable in configuration file (lets say some.txt), which will be delivered as a txt file next to an application. It doesn't matter now where will be some.txt file placed, even root for an application is ok for now.
This mean, that as a customer I am able to change it easy. Open some.txt file and change the value from i.e.: 256 to i.e.: 555.
During investigation I was able to find this. But its not suitable for my case. What I am searching for is configuration in some.txt file with really simple property i.e.:
AutoGrowCollectionLimit=[configurable_number]
According to spring docs, I tried following:
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setAutoGrowCollectionLimit(${set.max.collectionLimit});
}
And also edited [projectUrl]/src/main/resources/application.yml with following:
set:
max:
collectionLimit: 500
IDE is expecting ')' or '}', when I am trying to call this property in:
binder.setAutoGrowCollectionLimit(${set.max.collectionLimit});
Can someone help?