wangbing 6 years ago
parent 46ce100b0c
commit c80ef67b51

@ -5,7 +5,7 @@ import ${basePackage}.frame.base.BaseResponse;
import ${basePackage}.frame.base.ErrorType; import ${basePackage}.frame.base.ErrorType;
import ${basePackage}.frame.base.Screen; import ${basePackage}.frame.base.Screen;
import ${basePackage}.frame.utils.LocalData; import ${basePackage}.frame.utils.LocalData;
import ${basePackage}.config.BeanDefinitionRegistryConfig; import ${basePackage}.config.ActionConfig;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.springframework.boot.web.servlet.error.ErrorController; import org.springframework.boot.web.servlet.error.ErrorController;
@ -119,7 +119,7 @@ public class GlobalController implements ErrorController {
Screen screenExec = null; Screen screenExec = null;
try { try {
servletPath = servletPath.replaceAll("/", ".").toLowerCase(); servletPath = servletPath.replaceAll("/", ".").toLowerCase();
screenExec = LocalData.getApplicationContext().getBean(BeanDefinitionRegistryConfig.SCREEN_PREFIX + servletPath, Screen.class); screenExec = LocalData.getApplicationContext().getBean(ActionConfig.SCREEN_PREFIX + servletPath, Screen.class);
screenExec.exec(model, request, response); screenExec.exec(model, request, response);
} catch (BeansException e) { } catch (BeansException e) {

@ -1,7 +1,7 @@
package ${basePackage}.frame.freemarker; package ${basePackage}.frame.freemarker;
import java.io.File; import java.io.File;
import ${basePackage}.config.BeanDefinitionRegistryConfig; import ${basePackage}.config.ActionConfig;
import freemarker.template.TemplateModelException; import freemarker.template.TemplateModelException;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -74,7 +74,7 @@ public class Layout {
// 查找是否存在对应控制面板执行器 // 查找是否存在对应控制面板执行器
Control controlExec = null; Control controlExec = null;
try { try {
controlExec = LocalData.getApplicationContext().getBean(BeanDefinitionRegistryConfig.CONTROL_PREFIX + "." + control, Control.class); controlExec = LocalData.getApplicationContext().getBean(ActionConfig.CONTROL_PREFIX + "." + control, Control.class);
HttpServletRequest request = LocalData.getRequest(); HttpServletRequest request = LocalData.getRequest();
HttpServletResponse response = LocalData.getResponse(); HttpServletResponse response = LocalData.getResponse();

Loading…
Cancel
Save

Powered by TurnKey Linux.