Is there a way to set the defaultValue to a value from the application.properties file?
@ResponseBody
public void test(@RequestParam(name="testValue", defaultValue = <something from application.properties>))
Is there a way to set the defaultValue to a value from the application.properties file?
@ResponseBody
public void test(@RequestParam(name="testValue", defaultValue = <something from application.properties>))
Declare your defaultValue
as a controller variable like this
@Value("${variable.name.in.app.properties}")
private String myDefaultValue;
Then, in your controller action, assign it like this
@ResponseBody
public void test(@RequestParam(name="testValue", defaultValue = myDefaultValue))