|
|
@ -1,4 +1,6 @@
|
|
|
|
package ${basePackage}.action;
|
|
|
|
package $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;{basePackage}.action;
|
|
|
|
|
|
|
|
|
|
|
|
import ${basePackage}.frame.base.*;
|
|
|
|
import ${basePackage}.frame.base.*;
|
|
|
|
import ${basePackage}.frame.auth.LocalData;
|
|
|
|
import ${basePackage}.frame.auth.LocalData;
|
|
|
@ -167,14 +169,18 @@ public class GlobalController implements ErrorController {
|
|
|
|
layout = sb.toString();
|
|
|
|
layout = sb.toString();
|
|
|
|
View view = viewResolver.resolveViewName(layout, locale);
|
|
|
|
View view = viewResolver.resolveViewName(layout, locale);
|
|
|
|
if (view == null) {
|
|
|
|
if (view == null) {
|
|
|
|
response.setStatus(HttpStatus.NOT_FOUND.value());
|
|
|
|
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
|
|
|
|
return null;
|
|
|
|
return error(request, response);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 尝试执行Screen执行器(服务器渲染),并返回视图模板
|
|
|
|
// 尝试执行Screen执行器(服务器渲染),并返回视图模板
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Screen screenExec = LocalData.getApplicationContext().getBean(ActionConfig.SCREEN_PREFIX + action, Screen.class);
|
|
|
|
Screen screenExec = LocalData.getApplicationContext().getBean(ActionConfig.SCREEN_PREFIX + action, Screen.class);
|
|
|
|
screenExec.exec(model, request, response);
|
|
|
|
screenExec.exec(model, request, response);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (response.getStatus() != HttpServletResponse.SC_OK) {
|
|
|
|
|
|
|
|
return error(request, response);
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (BeansException e) {
|
|
|
|
} catch (BeansException e) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|