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
f3e7902f
Commit
f3e7902f
authored
Feb 26, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增系统名称全局变量
parent
f9422b8b
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
35 additions
and
47 deletions
+35
-47
src/main/java/cn/stylefeng/guns/GunsApplication.java
+1
-1
src/main/java/cn/stylefeng/guns/core/beetl/BeetlConfiguration.java
+12
-34
src/main/java/cn/stylefeng/guns/core/common/constant/Const.java
+10
-0
src/main/webapp/pages/404.html
+1
-1
src/main/webapp/pages/common/_header.html
+1
-1
src/main/webapp/pages/common/tree_dlg.html
+2
-2
src/main/webapp/pages/index.html
+1
-1
src/main/webapp/pages/login.html
+1
-1
src/main/webapp/pages/modular/frame/welcome.html
+2
-2
src/main/webapp/pages/modular/system/role/role_assign.html
+2
-2
src/main/webapp/pages/modular/system/user/user_roleassign.html
+2
-2
No files found.
src/main/java/cn/stylefeng/guns/GunsApplication.java
View file @
f3e7902f
...
@@ -34,6 +34,6 @@ public class GunsApplication {
...
@@ -34,6 +34,6 @@ public class GunsApplication {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
GunsApplication
.
class
,
args
);
SpringApplication
.
run
(
GunsApplication
.
class
,
args
);
logger
.
info
(
"GunsApplication
is success!"
);
logger
.
info
(
GunsApplication
.
class
.
getSimpleName
()
+
"
is success!"
);
}
}
}
}
src/main/java/cn/stylefeng/guns/core/beetl/BeetlConfiguration.java
View file @
f3e7902f
...
@@ -15,17 +15,15 @@
...
@@ -15,17 +15,15 @@
*/
*/
package
cn
.
stylefeng
.
guns
.
core
.
beetl
;
package
cn
.
stylefeng
.
guns
.
core
.
beetl
;
import
cn.stylefeng.guns.core.util.DefaultImages
;
import
cn.stylefeng.guns.core.util.KaptchaUtil
;
import
cn.stylefeng.guns.core.util.KaptchaUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
cn.stylefeng.roses.core.util.ToolUtil
;
import
org.beetl.core.Context
;
import
org.beetl.core.Function
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
java.io.UnsupportedEncodingException
;
import
java.util.HashMap
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Map
;
import
static
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
.
Const
.
DEFAULT_SYSTEM_NAME
;
import
static
cn
.
stylefeng
.
guns
.
core
.
common
.
constant
.
Const
.
DEFAULT_WELCOME_TIP
;
/**
/**
* beetl拓展配置,绑定一些工具类,方便在模板中直接调用
* beetl拓展配置,绑定一些工具类,方便在模板中直接调用
...
@@ -35,38 +33,18 @@ import java.nio.charset.StandardCharsets;
...
@@ -35,38 +33,18 @@ import java.nio.charset.StandardCharsets;
*/
*/
public
class
BeetlConfiguration
extends
BeetlGroupUtilConfiguration
{
public
class
BeetlConfiguration
extends
BeetlGroupUtilConfiguration
{
@Autowired
private
Environment
env
;
@Override
@Override
public
void
initOther
()
{
public
void
initOther
()
{
groupTemplate
.
registerFunctionPackage
(
"images"
,
new
DefaultImages
());
//全局共享变量
Map
<
String
,
Object
>
shared
=
new
HashMap
<>();
shared
.
put
(
"systemName"
,
DEFAULT_SYSTEM_NAME
);
shared
.
put
(
"welcomeTip"
,
DEFAULT_WELCOME_TIP
);
groupTemplate
.
setSharedVars
(
shared
);
//全局共享方法
groupTemplate
.
registerFunctionPackage
(
"shiro"
,
new
ShiroExt
());
groupTemplate
.
registerFunctionPackage
(
"shiro"
,
new
ShiroExt
());
groupTemplate
.
registerFunctionPackage
(
"tool"
,
new
ToolUtil
());
groupTemplate
.
registerFunctionPackage
(
"tool"
,
new
ToolUtil
());
groupTemplate
.
registerFunctionPackage
(
"kaptcha"
,
new
KaptchaUtil
());
groupTemplate
.
registerFunctionPackage
(
"kaptcha"
,
new
KaptchaUtil
());
groupTemplate
.
registerFunction
(
"env"
,
new
Function
()
{
@Override
public
String
call
(
Object
[]
paras
,
Context
ctx
)
{
String
key
=
(
String
)
paras
[
0
];
String
value
=
env
.
getProperty
(
key
);
if
(
value
!=
null
)
{
return
getStr
(
value
);
}
if
(
paras
.
length
==
2
)
{
return
(
String
)
paras
[
1
];
}
return
null
;
}
String
getStr
(
String
str
)
{
try
{
return
new
String
(
str
.
getBytes
(
"iso8859-1"
),
StandardCharsets
.
UTF_8
);
}
catch
(
UnsupportedEncodingException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
});
}
}
}
}
src/main/java/cn/stylefeng/guns/core/common/constant/Const.java
View file @
f3e7902f
...
@@ -28,6 +28,16 @@ import java.util.List;
...
@@ -28,6 +28,16 @@ import java.util.List;
public
interface
Const
{
public
interface
Const
{
/**
/**
* 默认管理系统的名称
*/
String
DEFAULT_SYSTEM_NAME
=
"Guns管理系统"
;
/**
* 默认欢迎界面的提示
*/
String
DEFAULT_WELCOME_TIP
=
"欢迎使用Guns管理系统!"
;
/**
* 系统默认的管理员密码
* 系统默认的管理员密码
*/
*/
String
DEFAULT_PWD
=
"111111"
;
String
DEFAULT_PWD
=
"111111"
;
...
...
src/main/webapp/pages/404.html
View file @
f3e7902f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<html>
<html>
<head>
<head>
<title>
Guns管理系统
</title>
<title>
${systemName}
</title>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
...
...
src/main/webapp/pages/common/_header.html
View file @
f3e7902f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"layui-logo"
>
<div
class=
"layui-logo"
>
<!--<img src="${ctxPath}/assets/common/images/logo.png"/>-->
<!--<img src="${ctxPath}/assets/common/images/logo.png"/>-->
<i
class=
"layui-icon layui-icon-component"
></i>
<i
class=
"layui-icon layui-icon-component"
></i>
<cite>
Guns管理系统
 
</cite>
<cite>
${systemName}
 
</cite>
</div>
</div>
<ul
class=
"layui-nav layui-layout-left"
>
<ul
class=
"layui-nav layui-layout-left"
>
<li
class=
"layui-nav-item"
lay-unselect
>
<li
class=
"layui-nav-item"
lay-unselect
>
...
...
src/main/webapp/pages/common/tree_dlg.html
View file @
f3e7902f
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
${
title!"Guns管理系统"
}
</title>
<title>
${
systemName
}
</title>
<meta
name=
"description"
content=
"
Guns管理系统
"
>
<meta
name=
"description"
content=
"
${systemName}
"
>
<meta
name=
"author"
content=
"stylefeng"
>
<meta
name=
"author"
content=
"stylefeng"
>
<!--其他插件css-->
<!--其他插件css-->
...
...
src/main/webapp/pages/index.html
View file @
f3e7902f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<link
href=
"${ctxPath}/assets/common/images/favicon.ico"
rel=
"icon"
>
<link
href=
"${ctxPath}/assets/common/images/favicon.ico"
rel=
"icon"
>
<title>
Guns管理系统
</title>
<title>
${systemName}
</title>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/module/admin.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/module/admin.css"
/>
</head>
</head>
...
...
src/main/webapp/pages/login.html
View file @
f3e7902f
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<div
class=
"login-wrapper"
>
<div
class=
"login-wrapper"
>
<div
class=
"login-header"
>
<div
class=
"login-header"
>
<img
src=
"${ctxPath}/assets/common/images/logo.png"
>
Guns管理系统
<img
src=
"${ctxPath}/assets/common/images/logo.png"
>
${systemName}
</div>
</div>
<div
class=
" login-body"
>
<div
class=
" login-body"
>
...
...
src/main/webapp/pages/modular/frame/welcome.html
View file @
f3e7902f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<html>
<html>
<head>
<head>
<title>
Guns管理系统
</title>
<title>
${systemName}
</title>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
<div
class=
"layui-card-body"
style=
"text-align: center;"
>
<div
class=
"layui-card-body"
style=
"text-align: center;"
>
<h2
style=
"margin-top: 170px;margin-bottom: 20px;font-size: 28px;color: #91ADDC;"
>
欢迎使用Guns管理系统 !
</h2>
<h2
style=
"margin-top: 170px;margin-bottom: 20px;font-size: 28px;color: #91ADDC;"
>
${welcomeTip}
</h2>
<img
src=
"${ctxPath}/assets/common/images/welcome.png"
style=
"max-width: 100%;"
>
<img
src=
"${ctxPath}/assets/common/images/welcome.png"
style=
"max-width: 100%;"
>
</div>
</div>
...
...
src/main/webapp/pages/modular/system/role/role_assign.html
View file @
f3e7902f
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
${
title!"Guns管理系统"
}
</title>
<title>
${
systemName
}
</title>
<meta
name=
"description"
content=
"
Guns管理系统
"
>
<meta
name=
"description"
content=
"
${systemName}
"
>
<meta
name=
"author"
content=
"stylefeng"
>
<meta
name=
"author"
content=
"stylefeng"
>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
...
...
src/main/webapp/pages/modular/system/user/user_roleassign.html
View file @
f3e7902f
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
${
title!"Guns管理系统"
}
</title>
<title>
${
systemName
}
</title>
<meta
name=
"description"
content=
"
Guns管理系统
"
>
<meta
name=
"description"
content=
"
${systemName}
"
>
<meta
name=
"author"
content=
"stylefeng"
>
<meta
name=
"author"
content=
"stylefeng"
>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/layui/css/layui.css"
/>
...
...
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