public boolean checkResource(Locale locale) throws Exception {
return true;
}
罪魁祸首 就是spring实现该方法时返回true,这样相当于view总是存在,从而导致其余视图解析器无法得到解析机会。
覆盖该方法,应该就可以了。
- public class IcomJstlView extends JstlView {
- public boolean checkResource(Locale locale) throws Exception {
- File file = new File(this.getServletContext().getRealPath("/")+getUrl());
- return file.exists();//判断该jsp页面是否存在
- }
- }