Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
80d8911f
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,发现更多精彩内容 >>
提交
80d8911f
编写于
4月 29, 2020
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
version fix
上级
78354ff4
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
40 addition
and
15 deletion
+40
-15
maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java
.../src/main/java/org/maxkey/web/InitApplicationContext.java
+5
-5
maxkey-core/src/main/java/org/maxkey/web/WebContext.java
maxkey-core/src/main/java/org/maxkey/web/WebContext.java
+3
-0
maxkey-core/src/main/java/org/maxkey/web/tag/LocaleTagDirective.java
.../src/main/java/org/maxkey/web/tag/LocaleTagDirective.java
+10
-4
maxkey-web-manage/src/main/resources/application.properties
maxkey-web-manage/src/main/resources/application.properties
+0
-1
maxkey-web-manage/src/main/resources/messages/message.properties
...web-manage/src/main/resources/messages/message.properties
+5
-1
maxkey-web-manage/src/main/resources/messages/message_en.properties
...-manage/src/main/resources/messages/message_en.properties
+5
-1
maxkey-web-manage/src/main/resources/templates/views/groups/groupAdd.ftl
...ge/src/main/resources/templates/views/groups/groupAdd.ftl
+6
-0
maxkey-web-manage/src/main/resources/templates/views/groups/groupUpdate.ftl
...src/main/resources/templates/views/groups/groupUpdate.ftl
+6
-0
maxkey-web-maxkey/src/main/resources/application.properties
maxkey-web-maxkey/src/main/resources/application.properties
+0
-1
maxkey-web-maxkey/src/main/resources/messages/message.properties
...web-maxkey/src/main/resources/messages/message.properties
+0
-1
maxkey-web-maxkey/src/main/resources/messages/message_en.properties
...-maxkey/src/main/resources/messages/message_en.properties
+0
-1
未找到文件。
maxkey-core/src/main/java/org/maxkey/web/InitApplicationContext.java
浏览文件 @
80d8911f
...
...
@@ -30,7 +30,7 @@ public class InitApplicationContext extends HttpServlet {
private
static
final
Logger
_logger
=
LoggerFactory
.
getLogger
(
InitApplicationContext
.
class
);
private
static
final
long
serialVersionUID
=
-
797399138268601444L
;
ApplicationContext
applicationContext
;
Properties
properties
;
@Override
public
String
getServletInfo
()
{
...
...
@@ -146,11 +146,11 @@ public class InitApplicationContext extends HttpServlet {
PropertySourcesPlaceholderConfigurer
propertySourcesPlaceholderConfigurer
=
((
PropertySourcesPlaceholderConfigurer
)
applicationContext
.
getBean
(
"propertySourcesPlaceholderConfigurer"
));
properties
=
(
Properties
)
propertySourcesPlaceholderConfigurer
WebContext
.
properties
=
(
Properties
)
propertySourcesPlaceholderConfigurer
.
getAppliedPropertySources
()
.
get
(
PropertySourcesPlaceholderConfigurer
.
LOCAL_PROPERTIES_PROPERTY_SOURCE_NAME
)
.
getSource
();
Set
<
Object
>
keyValue
=
properties
.
keySet
();
Set
<
Object
>
keyValue
=
WebContext
.
properties
.
keySet
();
SortedSet
<
String
>
keyValueSet
=
new
TreeSet
<
String
>();
// sort key
for
(
Iterator
<
Object
>
it
=
keyValue
.
iterator
();
it
.
hasNext
();)
{
...
...
@@ -160,7 +160,7 @@ public class InitApplicationContext extends HttpServlet {
// out
for
(
Iterator
<
String
>
it
=
keyValueSet
.
iterator
();
it
.
hasNext
();)
{
String
key
=
(
String
)
it
.
next
();
_logger
.
trace
(
key
+
" = "
+
properties
.
get
(
key
));
_logger
.
trace
(
key
+
" = "
+
WebContext
.
properties
.
get
(
key
));
}
_logger
.
trace
(
"-----------------------------------------------------------"
);
}
...
...
@@ -195,7 +195,7 @@ public class InitApplicationContext extends HttpServlet {
_logger
.
info
(
"+ MaxKey "
);
_logger
.
info
(
"+ Single Sign On ( SSO ) "
);
_logger
.
info
(
"+ Version "
+
properties
.
getProperty
(
"application.formatted-version"
));
+
WebContext
.
properties
.
getProperty
(
"application.formatted-version"
));
_logger
.
info
(
"+"
);
_logger
.
info
(
"+ https://www.maxkey.top/"
);
_logger
.
info
(
"+ email:shimingxy@163.com"
);
...
...
maxkey-core/src/main/java/org/maxkey/web/WebContext.java
浏览文件 @
80d8911f
package
org.maxkey.web
;
import
java.util.Locale
;
import
java.util.Properties
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
org.apache.commons.logging.LogFactory
;
...
...
@@ -29,6 +30,8 @@ import org.springframework.web.servlet.support.RequestContextUtils;
*/
public
final
class
WebContext
{
public
static
Properties
properties
;
/**
* set Current login user to session.
*
...
...
maxkey-core/src/main/java/org/maxkey/web/tag/LocaleTagDirective.java
浏览文件 @
80d8911f
...
...
@@ -4,6 +4,8 @@ import java.io.IOException;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.maxkey.web.WebContext
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -34,21 +36,25 @@ public class LocaleTagDirective implements TemplateDirectiveModel {
throws
TemplateException
,
IOException
{
WebApplicationContext
webApplicationContext
=
RequestContextUtils
.
findWebApplicationContext
(
request
);
String
message
=
""
;
if
(
params
.
get
(
"code"
)
==
null
)
{
env
.
getOut
().
append
(
RequestContextUtils
.
getLocale
(
request
).
getLanguage
());
message
=
RequestContextUtils
.
getLocale
(
request
).
getLanguage
();
}
else
if
(
params
.
get
(
"code"
).
toString
().
equals
(
"global.application.version"
)
||
params
.
get
(
"code"
).
toString
().
equals
(
"application.version"
))
{
message
=
WebContext
.
properties
.
getProperty
(
"application.formatted-version"
);
}
else
{
_logger
.
trace
(
"message code "
+
params
.
get
(
"code"
));
try
{
env
.
getOut
().
append
(
webApplicationContext
.
getMessage
(
message
=
webApplicationContext
.
getMessage
(
params
.
get
(
"code"
).
toString
(),
null
,
RequestContextUtils
.
getLocale
(
request
))
)
;
RequestContextUtils
.
getLocale
(
request
));
}
catch
(
Exception
e
)
{
_logger
.
error
(
"message code "
+
params
.
get
(
"code"
),
e
);
}
}
env
.
getOut
().
append
(
message
);
}
}
maxkey-web-manage/src/main/resources/application.properties
浏览文件 @
80d8911f
...
...
@@ -6,7 +6,6 @@ server.port=9521
server.servlet.context-path
=
/maxkey-mgt
application.name
=
MaxKey-Mgt
#message.properties global.application.version is need to update
application.formatted-version
=
v1.4.0 GA
#for freemarker
...
...
maxkey-web-manage/src/main/resources/messages/message.properties
浏览文件 @
80d8911f
global.application
=
MaxKey
\u
5E94
\u7528\u
5B89
\u5168\u
7BA1
\u7406\u
7CFB
\u
7EDF
global.application.version
=
v1.3.0 GA
global.change.language
=
\u
8BED
\u
97F3
\u9009\u
62E9
global.change.language.en
=
English
global.change.language.zh
=
\u
4E2D
\u6587
...
...
@@ -386,6 +385,10 @@ apps.oauth.connect.userInfoEncryptionMethod=\u7528\u6237\u52A0\u5BC6\u65B9\u6CD5
group.id
=
\u
7EC4
\u
7F16
\u7801
group.name
=
\u7528\u6237\u
7EC4
#role
role.id
=
\u
89D2
\u8272\u
7F16
\u7801
role.name
=
\u
89D2
\u8272
#account
account.username
=
\u7528\u6237\u
540D
account.displayName
=
\u7528\u6237\u
59D3
\u
540D
...
...
@@ -465,3 +468,4 @@ navs.audit=\u65E5\u5FD7\u5BA1\u8BA1
navs.audit.login
=
\u
767B
\u
5F55
\u
65E5
\u
5FD7
navs.audit.loginapps
=
\u
8BBF
\u
95EE
\u
65E5
\u
5FD7
navs.audit.operate
=
\u
64CD
\u
4F5C
\u
65E5
\u
5FD7
navs.roles
=
\u
89D2
\u8272\u
7BA1
\u7406
maxkey-web-manage/src/main/resources/messages/message_en.properties
浏览文件 @
80d8911f
global.application
=
MaxKey Secure Management
global.application.version
=
v1.3.0 GA
global.change.language
=
Language
global.change.language.en
=
English
global.change.language.zh
=
\u
4E2D
\u6587
...
...
@@ -385,6 +384,10 @@ apps.oauth.connect.userInfoEncryptionMethod=idTokenEncryptionMethod
group.id
=
id
group.name
=
name
#role
role.id
=
id
role.name
=
name
#account
account.username
=
username
account.displayName
=
displayName
...
...
@@ -465,3 +468,4 @@ navs.audit=Audit
navs.audit.login
=
Login
navs.audit.loginapps
=
LoginApps
navs.audit.operate
=
Operate
navs.roles
=
Roles
\ No newline at end of file
maxkey-web-manage/src/main/resources/templates/views/groups/groupAdd.ftl
浏览文件 @
80d8911f
...
...
@@ -19,6 +19,12 @@
<td
nowrap
>
<input
type=
"text"
id=
"name"
name=
"name"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.description"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"description"
name=
"description"
class=
"form-control"
title=
""
value=
""
/>
</td>
</tr>
<tr>
<td
nowrap
colspan=
"2"
class=
"center"
>
...
...
maxkey-web-manage/src/main/resources/templates/views/groups/groupUpdate.ftl
浏览文件 @
80d8911f
...
...
@@ -25,6 +25,12 @@
<td
nowrap
>
<input
type=
"text"
id=
"name"
name=
"name"
class=
"form-control"
title=
""
value=
"${model.name}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.description"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"description"
name=
"description"
class=
"form-control"
title=
""
value=
"${model.description!}"
/>
</td>
</tr>
<tr>
<td
nowrap
colspan=
"2"
class=
"center"
>
...
...
maxkey-web-maxkey/src/main/resources/application.properties
浏览文件 @
80d8911f
...
...
@@ -14,7 +14,6 @@ server.ssl.key-store-type=JKS
server.servlet.context-path
=
/maxkey
application.name
=
MaxKey
#message.properties global.application.version is need to update
application.formatted-version
=
v1.4.0 GA
#for freemarker
...
...
maxkey-web-maxkey/src/main/resources/messages/message.properties
浏览文件 @
80d8911f
global.application
=
MaxKey
\u
5E94
\u7528\u
5B89
\u5168\u
7CFB
\u
7EDF
global.application.version
=
v1.3.0 GA
global.change.language
=
\u
8BED
\u
97F3
\u9009\u
62E9
global.change.language.en
=
English
global.change.language.zh
=
\u
4E2D
\u6587
...
...
maxkey-web-maxkey/src/main/resources/messages/message_en.properties
浏览文件 @
80d8911f
global.application
=
MaxKey Secure Sign-on System
global.application.version
=
v1.3.0 GA
global.change.language
=
Language
global.change.language.en
=
English
global.change.language.zh
=
\u
4E2D
\u6587
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录