Skip to content

Commit a2efe17

Browse files
author
Phillip Webb
committed
Polish
1 parent 46c46db commit a2efe17

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,10 @@ public class SampleTomcatApplication {
3434

3535
private static Log logger = LogFactory.getLog(SampleTomcatApplication.class);
3636

37-
public static void main(String[] args) throws Exception {
38-
SpringApplication.run(SampleTomcatApplication.class, args);
39-
}
40-
4137
@Bean
4238
protected ServletContextListener listener() {
4339
return new ServletContextListener() {
40+
4441
@Override
4542
public void contextInitialized(ServletContextEvent sce) {
4643
logger.info("ServletContext initialized");
@@ -50,7 +47,12 @@ public void contextInitialized(ServletContextEvent sce) {
5047
public void contextDestroyed(ServletContextEvent sce) {
5148
logger.info("ServletContext destroyed");
5249
}
50+
5351
};
5452
}
5553

54+
public static void main(String[] args) throws Exception {
55+
SpringApplication.run(SampleTomcatApplication.class, args);
56+
}
57+
5658
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ public class SampleController {
3434
public String helloWorld() {
3535
return this.helloWorldService.getHelloMessage();
3636
}
37+
3738
}

0 commit comments

Comments
 (0)