Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/griffio/spring-boot-example
- Owner: griffio
- Created: 2015-01-13T03:49:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-10T12:30:40.000Z (almost 9 years ago)
- Last Synced: 2024-04-16T18:27:03.114Z (7 months ago)
- Language: Java
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
}
}
~~~