| @@ -96,6 +96,8 @@ public class ShiroConfig { | |||||
| //配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了 | //配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了 | ||||
| filterChainDefinitionMap.put("/logout", "anon"); | filterChainDefinitionMap.put("/logout", "anon"); | ||||
| filterChainDefinitionMap.put("/ue/**", "anon"); | |||||
| filterChainDefinitionMap.put("/config.json", "anon"); | |||||
| filterChainDefinitionMap.put("/doLogin/**", "anon"); | filterChainDefinitionMap.put("/doLogin/**", "anon"); | ||||
| filterChainDefinitionMap.put("/bHidLogin/**", "anon"); | filterChainDefinitionMap.put("/bHidLogin/**", "anon"); | ||||
| filterChainDefinitionMap.put("/css/**", "anon"); | filterChainDefinitionMap.put("/css/**", "anon"); | ||||
| @@ -88,7 +88,7 @@ public class WebConfig implements WebMvcConfigurer { | |||||
| // ueditor | // ueditor | ||||
| registry.addResourceHandler("/upload/**") | registry.addResourceHandler("/upload/**") | ||||
| .addResourceLocations("file:" + uEditorConfig.getUploadPath()); | .addResourceLocations("file:" + uEditorConfig.getUploadPath()); | ||||
| //registry.addResourceHandler("/app/**").addResourceLocations("classpath:/app/"); | |||||
| registry.addResourceHandler("/config.json").addResourceLocations("classpath:/config.json"); | |||||
| } | } | ||||
| @@ -133,6 +133,4 @@ public class WebConfig implements WebMvcConfigurer { | |||||
| jackson2HttpMessageConverter.setObjectMapper(objectMapper); | jackson2HttpMessageConverter.setObjectMapper(objectMapper); | ||||
| converters.add(jackson2HttpMessageConverter); | converters.add(jackson2HttpMessageConverter); | ||||
| } | } | ||||
| } | } | ||||
| @@ -18,7 +18,7 @@ public class UeditorController { | |||||
| @ResponseBody | @ResponseBody | ||||
| @RequestMapping("/ueditor/exec") | @RequestMapping("/ueditor/exec") | ||||
| public String exe(HttpServletRequest request){ | |||||
| public Object exe(HttpServletRequest request){ | |||||
| return actionEnter.exec(request); | return actionEnter.exec(request); | ||||
| } | } | ||||
| @@ -23,7 +23,7 @@ public class ActionEnter { | |||||
| this.configManager = configManager; | this.configManager = configManager; | ||||
| } | } | ||||
| public String exec(HttpServletRequest request) { | |||||
| public Object exec(HttpServletRequest request) { | |||||
| this.request = request; | this.request = request; | ||||
| this.actionType = request.getParameter("action"); | this.actionType = request.getParameter("action"); | ||||
| String callbackName = this.request.getParameter("callback"); | String callbackName = this.request.getParameter("callback"); | ||||
| @@ -34,7 +34,8 @@ public class ActionEnter { | |||||
| return new BaseState(false, AppInfo.ILLEGAL).toJSONString(); | return new BaseState(false, AppInfo.ILLEGAL).toJSONString(); | ||||
| } | } | ||||
| return callbackName + "(" + this.invoke() + ");"; | |||||
| //return callbackName + "(" + this.invoke() + ");"; | |||||
| return this.invoke(); | |||||
| } else { | } else { | ||||
| return this.invoke(); | return this.invoke(); | ||||
| @@ -42,7 +43,7 @@ public class ActionEnter { | |||||
| } | } | ||||
| public String invoke() { | |||||
| public Object invoke() { | |||||
| if (actionType == null || !ActionMap.mapping.containsKey(actionType)) { | if (actionType == null || !ActionMap.mapping.containsKey(actionType)) { | ||||
| return new BaseState(false, AppInfo.INVALID_ACTION).toJSONString(); | return new BaseState(false, AppInfo.INVALID_ACTION).toJSONString(); | ||||
| @@ -61,7 +62,7 @@ public class ActionEnter { | |||||
| switch (actionCode) { | switch (actionCode) { | ||||
| case ActionMap.CONFIG: | case ActionMap.CONFIG: | ||||
| return this.configManager.getAllConfig().toString(); | |||||
| return this.configManager.getAllConfig(); | |||||
| case ActionMap.UPLOAD_IMAGE: | case ActionMap.UPLOAD_IMAGE: | ||||
| case ActionMap.UPLOAD_SCRAWL: | case ActionMap.UPLOAD_SCRAWL: | ||||