Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
880a72c6
Commit
880a72c6
authored
Mar 02, 2018
by
李家智
Browse files
tomcat test
parent
3a36f2f6
Changes
20
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/java/com/ibeetl/admin/CosonleApplication.java
View file @
880a72c6
...
@@ -2,14 +2,20 @@ package com.ibeetl.admin;
...
@@ -2,14 +2,20 @@ package com.ibeetl.admin;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.web.WebApplicationInitializer
;
import
org.springframework.web.WebApplicationInitializer
;
@SpringBootApplication
@SpringBootApplication
@EnableCaching
@EnableCaching
public
class
CosonleApplication
extends
SpringBootServletInitializer
implements
WebApplicationInitializer
{
public
class
CosonleApplication
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
application
)
{
return
application
.
sources
(
CosonleApplication
.
class
);
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
CosonleApplication
.
class
,
args
);
SpringApplication
.
run
(
CosonleApplication
.
class
,
args
);
...
...
admin-console/src/main/resources/application.properties
View file @
880a72c6
...
@@ -5,7 +5,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
...
@@ -5,7 +5,7 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url= jdbc:oracle:thin:@127.0.0.1:1521:orcl
#spring.datasource.url= jdbc:oracle:thin:@127.0.0.1:1521:orcl
#spring.datasource.username=starter2
#spring.datasource.username=starter2
#spring.datasource.password=starter2
#spring.datasource.password=starter2
server.servlet.context-path
=
/admin-console
# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置
# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置
user.id
=
1
user.id
=
1
user.orgId
=
1
user.orgId
=
1
...
...
admin-console/src/main/resources/static/js/admin/audit/index.js
View file @
880a72c6
...
@@ -19,7 +19,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -19,7 +19,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#auditTable
'
,
elem
:
'
#auditTable
'
,
height
:
'
full-180
'
,
height
:
'
full-180
'
,
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/audit/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/audit/list.json
'
//数据接口
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/dict/index.js
View file @
880a72c6
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#dictTable
'
,
elem
:
'
#dictTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/dict/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/dict/list.json
'
//数据接口
,
,
page
:
Lib
.
tablePage
//开启分页
page
:
Lib
.
tablePage
//开启分页
,
,
...
...
admin-console/src/main/resources/static/js/admin/function/index.js
View file @
880a72c6
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#functionTable
'
,
elem
:
'
#functionTable
'
,
height
:
'
full-280
'
,
height
:
'
full-280
'
,
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/function/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/function/list.json
'
//数据接口
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/menu/index.js
View file @
880a72c6
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#menuTable
'
,
elem
:
'
#menuTable
'
,
height
:
'
full-280
'
,
height
:
'
full-280
'
,
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/menu/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/menu/list.json
'
//数据接口
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/org/index.js
View file @
880a72c6
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#orgTable
'
,
elem
:
'
#orgTable
'
,
height
:
Lib
.
getTableHeight
(
2
),
height
:
Lib
.
getTableHeight
(
2
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/org/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/org/list.json
'
//数据接口
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
page
:
{
"
layout
"
:[
'
count
'
,
'
prev
'
,
'
page
'
,
'
next
'
]}
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/org/orgUser.js
View file @
880a72c6
...
@@ -21,7 +21,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -21,7 +21,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#userTable
'
,
elem
:
'
#userTable
'
,
height
:
'
full-180
'
,
height
:
'
full-180
'
,
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/org/user/list.json?orgId=
'
+
orgId
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/org/user/list.json?orgId=
'
+
orgId
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/role/index.js
View file @
880a72c6
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -20,7 +20,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#roleTable
'
,
elem
:
'
#roleTable
'
,
height
:
Lib
.
getTableHeight
(
2
),
height
:
Lib
.
getTableHeight
(
2
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/role/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/role/list.json
'
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/role/roleFn.js
View file @
880a72c6
...
@@ -14,7 +14,7 @@ layui.define([ 'form', 'laydate', 'table','roleApi'], function(exports) {
...
@@ -14,7 +14,7 @@ layui.define([ 'form', 'laydate', 'table','roleApi'], function(exports) {
},
},
initFunctionTree
:
function
(){
initFunctionTree
:
function
(){
var
that
=
this
;
var
that
=
this
;
$
.
post
(
Common
.
CTX
+
"
/admin/function/tree.json
"
,
{},
function
(
response
)
{
$
.
post
(
Common
.
ctxPath
+
"
/admin/function/tree.json
"
,
{},
function
(
response
)
{
var
zNodes
=
response
.
data
;
var
zNodes
=
response
.
data
;
var
setting
=
{
"
check
"
:{
"
radioType
"
:
true
,
"
enable
"
:
true
}};
var
setting
=
{
"
check
"
:{
"
radioType
"
:
true
,
"
enable
"
:
true
}};
zTreeObj
=
$
.
fn
.
zTree
.
init
(
$
(
"
#functionTree
"
),
setting
,
zNodes
);
zTreeObj
=
$
.
fn
.
zTree
.
init
(
$
(
"
#functionTree
"
),
setting
,
zNodes
);
...
...
admin-console/src/main/resources/static/js/admin/role/roleUser.js
View file @
880a72c6
...
@@ -21,7 +21,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -21,7 +21,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#userTable
'
,
elem
:
'
#userTable
'
,
height
:
'
full-180
'
,
height
:
'
full-180
'
,
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/role/user/list.json?roleId=
'
+
roleId
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/role/user/list.json?roleId=
'
+
roleId
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/user/index.js
View file @
880a72c6
...
@@ -22,7 +22,7 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
...
@@ -22,7 +22,7 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
elem
:
'
#userTable
'
,
elem
:
'
#userTable
'
,
height
:
Lib
.
getTableHeight
(
2
),
height
:
Lib
.
getTableHeight
(
2
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/user/list.json
'
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/user/list.json
'
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-console/src/main/resources/static/js/admin/user/userRole.js
View file @
880a72c6
...
@@ -25,7 +25,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -25,7 +25,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#userRoleTable
'
,
elem
:
'
#userRoleTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/user/role/list.json?userId=
'
+
userId
//数据接口
url
:
Common
.
ctxPath
+
'
/admin/user/role/list.json?userId=
'
+
userId
//数据接口
,
page
:
false
,
page
:
false
,
limit
:
10000
,
,
limit
:
10000
,
cols
:
[
[
//表头
cols
:
[
[
//表头
...
...
admin-core/src/main/resources/codeTemplate/js/index.js
View file @
880a72c6
...
@@ -17,7 +17,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -17,7 +17,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
elem
:
'
#${entity.code}Table
'
,
elem
:
'
#${entity.code}Table
'
,
height
:
Lib
.
getTableHeight
(
1
),
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/${target.urlBase}/${entity.code}/list.json
'
// 数据接口
url
:
Common
.
ctxPath
+
'
/${target.urlBase}/${entity.code}/list.json
'
// 数据接口
,
page
:
Lib
.
tablePage
// 开启分页
,
page
:
Lib
.
tablePage
// 开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
// 表头
cols
:
[
[
// 表头
...
...
admin-core/src/main/resources/static/js/common.js
View file @
880a72c6
...
@@ -70,7 +70,7 @@ var Common = {
...
@@ -70,7 +70,7 @@ var Common = {
openDlg
:
function
(
url
,
title
){
openDlg
:
function
(
url
,
title
){
var
index
=
layer
.
open
({
var
index
=
layer
.
open
({
type
:
2
,
type
:
2
,
content
:
Common
.
CTX
+
url
,
content
:
Common
.
ctxPath
+
url
,
title
:
title
,
title
:
title
,
maxmin
:
false
maxmin
:
false
});
});
...
...
admin-core/src/main/resources/static/js/lib.js
View file @
880a72c6
...
@@ -202,7 +202,6 @@ var Lib = {
...
@@ -202,7 +202,6 @@ var Lib = {
}
}
value
=
data
.
value
;
value
=
data
.
value
;
if
(
value
!=
""
)
{
if
(
value
!=
""
)
{
Common
.
post
(
"
/core/dict/viewChildren.json
"
,
{
Common
.
post
(
"
/core/dict/viewChildren.json
"
,
{
"
value
"
:
value
,
"
value
"
:
value
,
"
group
"
:
groupName
"
group
"
:
groupName
...
...
admin-core/src/main/resources/templates/common/container.html
View file @
880a72c6
...
@@ -23,18 +23,19 @@
...
@@ -23,18 +23,19 @@
<script
type=
"text/javascript"
src=
"${ctxPath}/js/lib.js?v=${jsVer}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/js/lib.js?v=${jsVer}"
></script>
<!-- layUI -->
<!-- layUI -->
<script
type=
"text/javascript"
src=
"${ctxPath}/plugins/layui/layui.js?v=${jsVer}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/plugins/layui/layui.js?v=${jsVer}"
></script>
<!-- 设置全局变量 -->
<script>
Common
.
ctxPath
=
'
${ctxPath}
'
;
Common
.
version
=
'
${jsVer}
'
;
</script>
<script>
<script>
//设定layui模块的版本
//设定layui模块的版本
layui
.
config
({
layui
.
config
({
base
:
"
/plugins/frame/js/
"
,
// 菜单切换等功能
base
:
"
${ctxPath}
/plugins/frame/js/
"
,
// 菜单切换等功能
version
:
Common
.
version
version
:
Common
.
version
});
});
</script>
</script>
<!-- 设置全局变量 -->
<script>
Common
.
CTX
=
'
${ctxPath}
'
;
Common
.
version
=
'
${jsVer}
'
;
</script>
</head>
</head>
...
...
admin-core/src/main/resources/templates/common/layout.html
View file @
880a72c6
...
@@ -25,11 +25,12 @@
...
@@ -25,11 +25,12 @@
<script
type=
"text/javascript"
src=
"${ctxPath}/js/common.js?v=${jsVer}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/js/common.js?v=${jsVer}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/js/lib.js?v=${jsVer}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/js/lib.js?v=${jsVer}"
></script>
<script>
<script>
Common
.
CTX
=
'
${ctxPath}
'
;
Common
.
ctxPath
=
'
${ctxPath}
'
;
Common
.
version
=
'
${jsVer}
'
;
Common
.
version
=
'
${jsVer}
'
;
//设定layui模块的版本
//设定layui模块的版本
layui
.
config
({
layui
.
config
({
base
:
"
${jsBase!}
"
,
base
:
"
${
ctxPath}/${
jsBase!}
"
,
version
:
Common
.
version
version
:
Common
.
version
});
});
$
(
document
).
ready
(
function
()
{
}).
keydown
(
$
(
document
).
ready
(
function
()
{
}).
keydown
(
...
...
admin-core/src/main/resources/templates/index.html
View file @
880a72c6
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<a
href=
"javascript:;"
>
${subSystem.data.name}
</a>
<a
href=
"javascript:;"
>
${subSystem.data.name}
</a>
<dl
class=
"layui-nav-child"
>
<dl
class=
"layui-nav-child"
>
<!--#for(menu in subSystem.children){ -->
<!--#for(menu in subSystem.children){ -->
<dd
class=
""
><a
href=
"javascript:;"
menuId=
"${menu.data.id}"
dataUrl=
"${menu.data.accessUrl}"
><i
class=
"layui-icon"
>

</i>
<dd
class=
""
><a
href=
"javascript:;"
menuId=
"${menu.data.id}"
dataUrl=
"${
ctxPath}/${
menu.data.accessUrl}"
><i
class=
"layui-icon"
>

</i>
${menu.data.name}
${menu.data.name}
</a></dd>
</a></dd>
<!--#} -->
<!--#} -->
...
...
pom.xml
View file @
880a72c6
...
@@ -27,6 +27,11 @@
...
@@ -27,6 +27,11 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-devtools
</artifactId>
<artifactId>
spring-boot-devtools
</artifactId>
...
...
Write
Preview
Supports
Markdown
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