import java.util.Locale;
import java.util.Map;
import org.apache.http.impl.client.CloseableHttpClient;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
@SpringBootApplication
public class Application extends WebMvcConfigurerAdapter
{
- @Autowired
- private ServerProperties properties;
-
-
@Bean
public RegexUrlHandlerMapping proxiedHandlerMapping(
ProxyHttpRequestHandler proxy,
return resolver.resolveViewName("templates/500", Locale.getDefault());
}
- @Bean
- public DefaultExceptionHandler defaultExceptionHandler()
- {
- return new DefaultExceptionHandler();
- }
-
@Override
public void addViewControllers(ViewControllerRegistry registry)
@ControllerAdvice
public class DefaultExceptionHandler
{
+ public DefaultExceptionHandler()
+ {
+ }
+
+
@ResponseStatus(HttpStatus.NOT_FOUND)
@ExceptionHandler(value = TemplateInputException.class)
public ModelAndView templateInputExceptionHandler(