Commit 880a72c6 authored by 李家智's avatar 李家智
Browse files

tomcat test

parent 3a36f2f6
...@@ -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);
......
...@@ -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
......
...@@ -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 : [ [ //表头
......
...@@ -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 //开启分页
, ,
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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);
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ //表头
......
...@@ -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 : [ [ // 表头
......
...@@ -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
}); });
......
...@@ -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
......
...@@ -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>
......
...@@ -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(
......
...@@ -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">&#xe68e;</i> <dd class="" ><a href="javascript:;" menuId="${menu.data.id}" dataUrl="${ctxPath}/${menu.data.accessUrl}"><i class="layui-icon">&#xe68e;</i>
${menu.data.name} ${menu.data.name}
</a></dd> </a></dd>
<!--#} --> <!--#} -->
......
...@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment