Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
b7a0ecdd
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b7a0ecdd
编写于
1月 06, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
exception error
上级
8110d994
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
125 addition
and
99 deletion
+125
-99
maxkey-client-sdk/.classpath
maxkey-client-sdk/.classpath
+1
-0
maxkey-core/.classpath
maxkey-core/.classpath
+1
-0
maxkey-core/src/main/java/org/maxkey/web/ExceptionEndpoint.java
...-core/src/main/java/org/maxkey/web/ExceptionEndpoint.java
+39
-0
maxkey-dao/.classpath
maxkey-dao/.classpath
+2
-0
maxkey-protocols/maxkey-protocol-cas/.classpath
maxkey-protocols/maxkey-protocol-cas/.classpath
+1
-0
maxkey-web-manage/.classpath
maxkey-web-manage/.classpath
+1
-5
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtConfig.java
...-web-manage/src/main/java/org/maxkey/MaxKeyMgtConfig.java
+25
-0
maxkey-web-manage/src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
.../src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
+0
-12
maxkey-web-manage/src/main/resources/templates/views/exception/400.ftl
...nage/src/main/resources/templates/views/exception/400.ftl
+1
-1
maxkey-web-manage/src/main/resources/templates/views/exception/404.ftl
...nage/src/main/resources/templates/views/exception/404.ftl
+4
-3
maxkey-web-manage/src/main/resources/templates/views/exception/500.ftl
...nage/src/main/resources/templates/views/exception/500.ftl
+6
-0
maxkey-web-manage/src/main/resources/templates/views/exception/501.ftl
...nage/src/main/resources/templates/views/exception/501.ftl
+5
-0
maxkey-web-manage/src/main/resources/templates/views/exception/503.ftl
...nage/src/main/resources/templates/views/exception/503.ftl
+5
-0
maxkey-web-manage/src/main/resources/templates/views/exception/error.ftl
...ge/src/main/resources/templates/views/exception/error.ftl
+0
-5
maxkey-web-manage/src/main/resources/templates/views/exception/loginError.ftl
...c/main/resources/templates/views/exception/loginError.ftl
+0
-34
maxkey-web-manage/src/main/resources/templates/views/exception/oauthError.ftl
...c/main/resources/templates/views/exception/oauthError.ftl
+0
-18
maxkey-web-maxkey/.classpath
maxkey-web-maxkey/.classpath
+2
-5
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
+9
-9
maxkey-web-maxkey/src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
.../src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
+0
-6
maxkey-web-maxkey/src/main/resources/templates/views/exception/400.ftl
...xkey/src/main/resources/templates/views/exception/400.ftl
+1
-1
maxkey-web-maxkey/src/main/resources/templates/views/exception/404.ftl
...xkey/src/main/resources/templates/views/exception/404.ftl
+6
-0
maxkey-web-maxkey/src/main/resources/templates/views/exception/500.ftl
...xkey/src/main/resources/templates/views/exception/500.ftl
+6
-0
maxkey-web-maxkey/src/main/resources/templates/views/exception/501.ftl
...xkey/src/main/resources/templates/views/exception/501.ftl
+5
-0
maxkey-web-maxkey/src/main/resources/templates/views/exception/503.ftl
...xkey/src/main/resources/templates/views/exception/503.ftl
+5
-0
maxkey-web-maxkey/src/main/resources/templates/views/exception/accessdeny.ftl
...c/main/resources/templates/views/exception/accessdeny.ftl
+0
-0
未找到文件。
maxkey-client-sdk/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -10,6 +10,7 @@
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
...
...
maxkey-core/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -10,6 +10,7 @@
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
...
...
maxkey-core/src/main/java/org/maxkey/web/ExceptionEndpoint.java
0 → 100644
浏览文件 @
b7a0ecdd
package
org.maxkey.web
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
/**
* Index
* @author Crystal.Sea
*
*/
@Controller
public
class
ExceptionEndpoint
{
private
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
ExceptionEndpoint
.
class
);
@RequestMapping
(
value
={
"/exception/error/400"
})
public
ModelAndView
error400
()
{
_logger
.
debug
(
"exception/400."
);
return
new
ModelAndView
(
"exception/400"
);
}
@RequestMapping
(
value
={
"/exception/error/404"
})
public
ModelAndView
error404
()
{
_logger
.
debug
(
"exception/404."
);
return
new
ModelAndView
(
"exception/404"
);
}
@RequestMapping
(
value
={
"/exception/error/500"
})
public
ModelAndView
error500
()
{
_logger
.
debug
(
"exception/500."
);
return
new
ModelAndView
(
"exception/500"
);
}
@RequestMapping
(
value
={
"/exception/accessdeny"
})
public
ModelAndView
accessdeny
()
{
_logger
.
debug
(
"exception/accessdeny."
);
return
new
ModelAndView
(
"exception/accessdeny"
);
}
}
\ No newline at end of file
maxkey-dao/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -16,12 +16,14 @@
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"bin/test"
path=
"src/test/resources"
>
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
...
...
maxkey-protocols/maxkey-protocol-cas/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -10,6 +10,7 @@
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
...
...
maxkey-web-manage/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -14,10 +14,6 @@
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.web.container"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
>
<attributes>
<attribute
name=
"org.eclipse.jst.component.dependency"
value=
"/WEB-INF/lib"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
/>
<classpathentry
kind=
"output"
path=
"bin/default"
/>
</classpath>
maxkey-web-manage/src/main/java/org/maxkey/MaxKeyMgtConfig.java
浏览文件 @
b7a0ecdd
package
org.maxkey
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.web.server.ConfigurableWebServerFactory
;
import
org.springframework.boot.web.server.ErrorPage
;
import
org.springframework.boot.web.server.WebServerFactoryCustomizer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Component
;
@Configuration
...
...
@@ -19,4 +24,24 @@ public class MaxKeyMgtConfig {
public
void
setPort
(
int
port
)
{
this
.
port
=
port
;
}
/**
* 配置默认错误页面(仅用于内嵌tomcat启动时)
* 使用这种方式,在打包为war后不起作用
*
* @return
*/
@Bean
public
WebServerFactoryCustomizer
<
ConfigurableWebServerFactory
>
webServerFactoryCustomizer
()
{
return
new
WebServerFactoryCustomizer
<
ConfigurableWebServerFactory
>()
{
@Override
public
void
customize
(
ConfigurableWebServerFactory
factory
)
{
ErrorPage
errorPage400
=
new
ErrorPage
(
HttpStatus
.
BAD_REQUEST
,
"/exception/error/400"
);
ErrorPage
errorPage404
=
new
ErrorPage
(
HttpStatus
.
NOT_FOUND
,
"/exception/error/404"
);
ErrorPage
errorPage500
=
new
ErrorPage
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
"/exception/error/500"
);
factory
.
addErrorPages
(
errorPage400
,
errorPage404
,
errorPage500
);
}
};
}
}
maxkey-web-manage/src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
浏览文件 @
b7a0ecdd
...
...
@@ -30,16 +30,4 @@ public class IndexEndpoint {
return
new
ModelAndView
(
"index"
);
}
@RequestMapping
(
value
={
"/accessdeny"
})
public
ModelAndView
accessdeny
()
{
_logger
.
debug
(
"exception/accessdeny."
);
return
new
ModelAndView
(
"exception/accessdeny"
);
}
// @RequestMapping(value={"/error"})
// public ModelAndView error() {
// _logger.debug("exception/error.");
// return new ModelAndView("exception/error");
// }
}
\ No newline at end of file
maxkey-web-ma
xkey/src/main/resources/templates/views/exception/500.jsp
→
maxkey-web-ma
nage/src/main/resources/templates/views/exception/400.ftl
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
Error
!
</h1>
<h1>
BAD_REQUEST
!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/exception/404.ftl
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
Page not found
!
</h1>
</body>
<body>
<h1>
REQUEST NOT_FOUND
!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/exception/500.ftl
0 → 100644
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
INTERNAL_SERVER_ERROR!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-ma
xkey/src/main/resources/templates/views/exception/503.jsp
→
maxkey-web-ma
nage/src/main/resources/templates/views/exception/501.ftl
浏览文件 @
b7a0ecdd
<html>
<body>
<h1>
Error
!
</h1>
<h1>
Not Implemented
!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/exception/503.ftl
0 → 100644
浏览文件 @
b7a0ecdd
<html>
<body>
<h1>
Service Unavailable !
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/exception/error.ftl
已删除
100644 → 0
浏览文件 @
8110d994
<html>
<body>
<h1>
ERROR!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/exception/loginError.ftl
已删除
100644 → 0
浏览文件 @
8110d994
<
%@
page
language=
"java"
import=
"java.util.*"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Login Error Page
</title>
<meta
http-equiv=
"pragma"
content=
"no-cache"
>
<meta
http-equiv=
"cache-control"
content=
"no-cache"
>
<meta
http-equiv=
"expires"
content=
"0"
>
<meta
http-equiv=
"keywords"
content=
"keyword1,keyword2,keyword3"
>
<meta
http-equiv=
"description"
content=
"This is my page"
>
<script
type=
"text/javascript"
>
function
autoChangeTime
()
{
var
time
=
document
.
getElementById
(
"
time
"
).
childNodes
[
0
].
nodeValue
;
var
delay
=
time
-
1
;
if
(
delay
>
0
)
{
document
.
getElementById
(
"
time
"
).
innerHTML
=
delay
;
}
else
{
document
.
location
.
href
=
"
${pageContext.request.contextPath}/login
"
;
return
;
}
}
function
init
()
{
window
.
setInterval
(
'
autoChangeTime()
'
,
'
1000
'
);
}
</script>
</head>
<body
onload=
"init()"
>
<div>
登录失败,失败原因 : ${errorMsg}
<br/>
系统将在
<span
id=
"time"
style=
"color: red;"
>
5
</span>
秒后,自动跳转到登录页面,您也可以通过点击
<a
href=
"${pageContext.request.contextPath}/login"
>
登录
</a>
手动跳转
</div>
</body>
</html>
maxkey-web-manage/src/main/resources/templates/views/exception/oauthError.ftl
已删除
100644 → 0
浏览文件 @
8110d994
<
%@
page
language=
"java"
import=
"java.util.*"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
Oauth Error Page
</title>
<meta
http-equiv=
"pragma"
content=
"no-cache"
>
<meta
http-equiv=
"cache-control"
content=
"no-cache"
>
<meta
http-equiv=
"expires"
content=
"0"
>
<meta
http-equiv=
"keywords"
content=
"keyword1,keyword2,keyword3"
>
<meta
http-equiv=
"description"
content=
"This is my page"
>
</head>
<body>
<div>
oauth认证失败!失败原因 : ${errorMsg}
</div>
</body>
</html>
maxkey-web-maxkey/.classpath
浏览文件 @
b7a0ecdd
...
...
@@ -16,14 +16,11 @@
<attributes>
<attribute
name=
"gradle_scope"
value=
"test"
/>
<attribute
name=
"gradle_used_by_scope"
value=
"test"
/>
<attribute
name=
"test"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jst.j2ee.internal.web.container"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
>
<attributes>
<attribute
name=
"org.eclipse.jst.component.dependency"
value=
"/WEB-INF/lib"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.buildship.core.gradleclasspathcontainer"
/>
<classpathentry
kind=
"output"
path=
"bin/default"
/>
</classpath>
maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyConfig.java
浏览文件 @
b7a0ecdd
...
...
@@ -37,20 +37,20 @@ public class MaxKeyConfig {
return
registration
;
}
/**
* 配置默认错误页面(仅用于内嵌tomcat启动时)
* 使用这种方式,在打包为war后不起作用
*
* @return
*/
/**
* 配置默认错误页面(仅用于内嵌tomcat启动时)
* 使用这种方式,在打包为war后不起作用
*
* @return
*/
@Bean
public
WebServerFactoryCustomizer
<
ConfigurableWebServerFactory
>
webServerFactoryCustomizer
()
{
return
new
WebServerFactoryCustomizer
<
ConfigurableWebServerFactory
>()
{
@Override
public
void
customize
(
ConfigurableWebServerFactory
factory
)
{
ErrorPage
errorPage400
=
new
ErrorPage
(
HttpStatus
.
BAD_REQUEST
,
"/e
rror-
400"
);
ErrorPage
errorPage404
=
new
ErrorPage
(
HttpStatus
.
NOT_FOUND
,
"/e
rror-
404"
);
ErrorPage
errorPage500
=
new
ErrorPage
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
"/e
rror-
500"
);
ErrorPage
errorPage400
=
new
ErrorPage
(
HttpStatus
.
BAD_REQUEST
,
"/e
xception/error/
400"
);
ErrorPage
errorPage404
=
new
ErrorPage
(
HttpStatus
.
NOT_FOUND
,
"/e
xception/error/
404"
);
ErrorPage
errorPage500
=
new
ErrorPage
(
HttpStatus
.
INTERNAL_SERVER_ERROR
,
"/e
xception/error/
500"
);
factory
.
addErrorPages
(
errorPage400
,
errorPage404
,
errorPage500
);
}
...
...
maxkey-web-maxkey/src/main/java/org/maxkey/web/endpoint/IndexEndpoint.java
浏览文件 @
b7a0ecdd
...
...
@@ -75,10 +75,4 @@ public class IndexEndpoint {
return
new
ModelAndView
(
"index"
);
}
@RequestMapping
(
value
={
"/accessdeny"
})
public
ModelAndView
accessdeny
()
{
_logger
.
debug
(
"exception/accessdeny."
);
return
new
ModelAndView
(
"exception/accessdeny"
);
}
}
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/40
4.jsp
→
maxkey-web-maxkey/src/main/resources/templates/views/exception/40
0.ftl
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
Error
!
</h1>
<h1>
BAD_REQUEST
!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/404.ftl
0 → 100644
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
REQUEST NOT_FOUND !
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/500.ftl
0 → 100644
浏览文件 @
b7a0ecdd
<!DOCTYPE html>
<html>
<body>
<h1>
INTERNAL_SERVER_ERROR!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/501.
jsp
→
maxkey-web-maxkey/src/main/resources/templates/views/exception/501.
ftl
浏览文件 @
b7a0ecdd
<html>
<body>
<h1>
Error
!
</h1>
<h1>
Not Implemented
!
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/503.ftl
0 → 100644
浏览文件 @
b7a0ecdd
<html>
<body>
<h1>
Service Unavailable !
</h1>
</body>
</html>
\ No newline at end of file
maxkey-web-maxkey/src/main/resources/templates/views/exception/accessdeny.
jsp
→
maxkey-web-maxkey/src/main/resources/templates/views/exception/accessdeny.
ftl
浏览文件 @
b7a0ecdd
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录