Skip to content

Commit 8388918

Browse files
committed
Revert accidental TomcatSample changes
1 parent 5f1bbf8 commit 8388918

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020

2121
import org.springframework.beans.factory.annotation.Autowired;
2222
import org.springframework.stereotype.Controller;
23-
import org.springframework.web.bind.annotation.ExceptionHandler;
2423
import org.springframework.web.bind.annotation.GetMapping;
2524
import org.springframework.web.bind.annotation.ResponseBody;
26-
import org.springframework.web.servlet.ModelAndView;
2725

2826
@Controller
2927
public class SampleController {
@@ -34,12 +32,7 @@ public class SampleController {
3432
@GetMapping("/")
3533
@ResponseBody
3634
public String helloWorld() {
37-
throw new RuntimeException("Fail");
38-
}
39-
40-
@ExceptionHandler(RuntimeException.class)
41-
public ModelAndView handle(RuntimeException ex) {
42-
return null;
35+
return this.helloWorldService.getHelloMessage();
4336
}
4437

4538
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
server.compression.enabled: true
22
server.compression.min-response-size: 1
33
server.connection-timeout=5000
4-
5-
spring.mvc.log-resolved-exception=true

0 commit comments

Comments
 (0)