+ @Bean
+ public JuploDialect juploDialect()
+ {
+ return new JuploDialect();
+ }
+
+ @Bean
+ public SimpleMappingExceptionResolver simpleMappingExceptionResolver()
+ {
+ SimpleMappingExceptionResolver resolver =
+ new SimpleMappingExceptionResolver();
+
+ Properties mappings = new Properties();
+ mappings.setProperty("TemplateInputException", "templates/404");
+
+ resolver.setExceptionMappings(mappings);
+ resolver.setDefaultErrorView("templates/500");
+ resolver.setWarnLogCategory("exception");
+ return resolver;
+ }
+
+ @Bean
+ public ErrorController errorController(
+ ApplicationContext context,
+ ErrorAttributes errorAttributes
+ )
+ {
+ return new ExceptionResolverErrorController(
+ context,
+ errorAttributes,
+ properties.getError()
+ );
+ }
+
+
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry)
+ {
+ registry.addViewController("/").setViewName("forward:index.html");
+ }
+