Commit 83889188 authored by Phillip Webb's avatar Phillip Webb

Revert accidental TomcatSample changes

parent 5f1bbf8c
...@@ -20,10 +20,8 @@ import sample.tomcat.service.HelloWorldService; ...@@ -20,10 +20,8 @@ import sample.tomcat.service.HelloWorldService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
@Controller @Controller
public class SampleController { public class SampleController {
...@@ -34,12 +32,7 @@ public class SampleController { ...@@ -34,12 +32,7 @@ public class SampleController {
@GetMapping("/") @GetMapping("/")
@ResponseBody @ResponseBody
public String helloWorld() { public String helloWorld() {
throw new RuntimeException("Fail"); return this.helloWorldService.getHelloMessage();
}
@ExceptionHandler(RuntimeException.class)
public ModelAndView handle(RuntimeException ex) {
return null;
} }
} }
server.compression.enabled: true server.compression.enabled: true
server.compression.min-response-size: 1 server.compression.min-response-size: 1
server.connection-timeout=5000 server.connection-timeout=5000
spring.mvc.log-resolved-exception=true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment