Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
4a7cb11b
Commit
4a7cb11b
authored
Aug 17, 2017
by
stylefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复视图解析器
parent
c5f3d96a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
guns-core/pom.xml
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/base/controller/GunsErrorView.java
+28
-0
No files found.
guns-core/pom.xml
View file @
4a7cb11b
...
...
@@ -46,8 +46,8 @@
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-web
</artifactId>
<groupId>
org.springframework
.boot
</groupId>
<artifactId>
spring-
boot-starter-
web
</artifactId>
<scope>
provided
</scope>
</dependency>
...
...
guns-core/src/main/java/com/stylefeng/guns/core/base/controller/GunsErrorView.java
0 → 100644
View file @
4a7cb11b
package
com
.
stylefeng
.
guns
.
core
.
base
.
controller
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.servlet.View
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
/**
* 错误页面的默认跳转(例如请求404的时候,默认走这个视图解析器)
*
* @author fengshuonan
* @date 2017-05-21 11:34
*/
@Component
(
"error"
)
public
class
GunsErrorView
implements
View
{
@Override
public
String
getContentType
()
{
return
"text/html"
;
}
@Override
public
void
render
(
Map
<
String
,
?>
map
,
HttpServletRequest
httpServletRequest
,
HttpServletResponse
httpServletResponse
)
throws
Exception
{
httpServletRequest
.
getRequestDispatcher
(
"/global/error"
).
forward
(
httpServletRequest
,
httpServletResponse
);
}
}
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