wangwei 5 роки тому
батько
коміт
50ee72ac32

+ 2 - 0
src/main/java/cn/com/qmth/examcloud/config/center/controller/ConfigCenterController.java

@@ -58,6 +58,7 @@ public class ConfigCenterController {
 		String configCenterActive = BootstrapSecurityManager.getInstance().getActive();
 		if (!configCenterActive.equals(active)) {
 			log.error("active is wrong");
+			return new ResponseEntity<>("active is wrong", HttpStatus.INTERNAL_SERVER_ERROR);
 		}
 
 		Map<String, String> map = null;
@@ -65,6 +66,7 @@ public class ConfigCenterController {
 			map = PropertiesLoader.getProperties(appCode, active);
 		} catch (Exception e) {
 			log.error(e.getMessage());
+			return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
 		}
 
 		String ret = JsonUtil.toJson(map);