Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
83889188
Commit
83889188
authored
Apr 16, 2019
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert accidental TomcatSample changes
parent
5f1bbf8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
10 deletions
+1
-10
SampleController.java
...cat/src/main/java/sample/tomcat/web/SampleController.java
+1
-8
application.properties
...t-sample-tomcat/src/main/resources/application.properties
+0
-2
No files found.
spring-boot-samples/spring-boot-sample-tomcat/src/main/java/sample/tomcat/web/SampleController.java
View file @
83889188
...
@@ -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
;
}
}
}
}
spring-boot-samples/spring-boot-sample-tomcat/src/main/resources/application.properties
View file @
83889188
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment