Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/griffio/spring-boot-example

spring boot 1.3.2.RELEASE, spring mvc, config
https://github.com/griffio/spring-boot-example

Last synced: 8 days ago
JSON representation

spring boot 1.3.2.RELEASE, spring mvc, config

Awesome Lists containing this project

README

        

# spring-boot-example
Spring boot 1.3.2.RELEASE
Spring web mvc

~~~
@SpringBootApplication
@RequestMapping
public class Main extends WebMvcConfigurerAdapter implements EmbeddedServletContainerCustomizer {

public static void main(String[] args) throws Exception {
SpringApplication.run(Main.class, args);
}

@Override public void customize(ConfigurableEmbeddedServletContainer container) {
container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"));
container.addErrorPages(new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/500.html"));
}

@Override
public void addViewControllers(ViewControllerRegistry registry) {
super.addViewControllers(registry);
registry.addStatusController("/status", HttpStatus.OK);
}
}
~~~