FunctionHandlerMapping needs to be defensive with debug flag
Spring Boot apps often run with --debug (no boolean value), so we need to be defensive and not barf if it's empty (and therefore not convertible to a boolean)
This commit is contained in:
@@ -52,7 +52,7 @@ public class FunctionHandlerMapping extends RequestMappingHandlerMapping
|
||||
private String prefix = "";
|
||||
|
||||
@Value("${debug:${DEBUG:false}}")
|
||||
private boolean debug = false;
|
||||
private String debug = "false";
|
||||
|
||||
@Autowired
|
||||
public FunctionHandlerMapping(FunctionCatalog catalog, FunctionInspector inspector) {
|
||||
@@ -65,7 +65,7 @@ public class FunctionHandlerMapping extends RequestMappingHandlerMapping
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
super.afterPropertiesSet();
|
||||
this.controller.setDebug(debug);
|
||||
this.controller.setDebug(!"false".equals(debug));
|
||||
detectHandlerMethods(controller);
|
||||
while (prefix.endsWith("/")) {
|
||||
prefix = prefix.substring(0, prefix.length() - 1);
|
||||
|
||||
Reference in New Issue
Block a user