Browse Source

Polish

pull/1128/head
Phillip Webb 12 years ago
parent
commit
a2efe17fc9
  1. 10
      spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/SampleTomcatApplication.java
  2. 1
      spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/web/SampleController.java

10
spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/SampleTomcatApplication.java

@ -34,13 +34,10 @@ public class SampleTomcatApplication { @@ -34,13 +34,10 @@ public class SampleTomcatApplication {
private static Log logger = LogFactory.getLog(SampleTomcatApplication.class);
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleTomcatApplication.class, args);
}
@Bean
protected ServletContextListener listener() {
return new ServletContextListener() {
@Override
public void contextInitialized(ServletContextEvent sce) {
logger.info("ServletContext initialized");
@ -50,7 +47,12 @@ public class SampleTomcatApplication { @@ -50,7 +47,12 @@ public class SampleTomcatApplication {
public void contextDestroyed(ServletContextEvent sce) {
logger.info("ServletContext destroyed");
}
};
}
public static void main(String[] args) throws Exception {
SpringApplication.run(SampleTomcatApplication.class, args);
}
}

1
spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/web/SampleController.java

@ -34,4 +34,5 @@ public class SampleController { @@ -34,4 +34,5 @@ public class SampleController {
public String helloWorld() {
return this.helloWorldService.getHelloMessage();
}
}

Loading…
Cancel
Save