fix when unhandledException=false does not take effect (#4543)

This commit is contained in:
Jason Lee
2019-11-20 10:11:02 +08:00
committed by William Cheng
parent 5238597f95
commit 8ff1aca4f8

View File

@@ -305,9 +305,8 @@ public class SpringCodegen extends AbstractJavaCodegen
if (additionalProperties.containsKey(UNHANDLED_EXCEPTION_HANDLING)) {
this.setUnhandledException(Boolean.valueOf(additionalProperties.get(UNHANDLED_EXCEPTION_HANDLING).toString()));
} else {
additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException());
}
additionalProperties.put(UNHANDLED_EXCEPTION_HANDLING, this.isUnhandledException());
typeMapping.put("file", "Resource");
importMapping.put("Resource", "org.springframework.core.io.Resource");