【发布时间】:2014-11-30 14:54:10
【问题描述】:
我希望有自定义 404 错误页面。我的类路径中有速度,但我不想使用速度视图解析器 下面是我的代码
@EnableAutoConfiguration(exclude={VelocityAutoConfiguration.class})
@ComponentScan
public class Application {
Properties props = new Properties();
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
我无法将所有 404 重定向到我在资源目录中的一些 html。
请帮忙
P.S 如果我使用velocityresolver 并且模板目录中有error.vm,它可以工作。
感谢问候
【问题讨论】:
标签: spring-boot