Spring Boot 迁移

web.xml

error page

1
2
3
4
<error-page>
<error-code>404</error-code>
<location>/WEB-INF/jsp/errors/error.jsp</location>
</error-page>
1
2
3
4
5
6
7
8
9
10
@Bean
public ServerProperties serverProperties () {
return new ServerProperties() {
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
super.customize(container);
container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/error/404"));
}
};
}

spring-context.xml

1
2
3
4
5
@ImportResource("classpath:spring-context.xml")
@EnableAdminServer
public class WebApplication extends SpringBootServletInitializer {
...
}

log back upgrade

1
2
3
4
5
<!-- change include to included for file that will be included, like this: -->
<!-- http://logback.qos.ch/manual/configuration.html -->
<included>
...
</included>