<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<meta charset="utf-8">
<link href="<%=basePath%>css/themes/default/easyui.css" rel="stylesheet" type="text/css"/>
<%-- <link href="<%=basePath%>css/themes/icon.css" rel="stylesheet" type="text/css"/> --%>
<link href="<%=basePath%>css/themes/color.css" rel="stylesheet" type="text/css"/>
<%-- <link href="<%=basePath%>css/themes/mobile.css" rel="stylesheet" type="text/css"/> --%>


<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/easyloader.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.mobile.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.parser.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.pagination.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.form.js"></script>
<style type="text/css">
#producttable{
width: 90%;
border-collapse:separate; border-spacing:0px 20px;
}
#producttable input{
height:32px;
}
</style>

</head>
<body>
<div style="height: 50%;width:70%;float: left;display:inline-block;margin-top: 35px;">
<table id="allotControltable">

</table>
</div>
<!-- 添加角色 -->
<div id="allotControlAdd">
<form id="allotControlAddform">
<table id="producttable">
<tr>
<td align="right">角色名称: </td>
<td>
<input id="REMARK" name="REMARK"></input>
</td>
<td align="right">类型生效标志:</td>
<td>
<select id="EFFECT_STS" name="EFFECT_STS" >
<option value="1" selected="selected">生效</option>
<option value="2">无效</option>
</select>
</td>
</tr>
</table>
</form>
</div>
<!-- 修改角色 -->
<div id="allotControlUpdate">
<form id="allotControlUpdateform">
<table id="producttable">
<tr>
<td align="right">角色名称: </td>
<td>
<input id="remark1" name="REMARK"></input>
</td>
<td align="right">类型生效标志:</td>
<td>
<select id="effect_STS1" name="EFFECT_STS" >
<option value="1" selected="selected">生效</option>
<option value="2">无效</option>
</select>
</td>
</tr>
<tr>
<td align="right">时间戳: </td>
<td>
<input id="tm_SMP1" name="TM_SMP" readonly="readonly"></input>
</td>

</tr>
</table>
</form>
</div>

<div id="container"
style="width: 12%; height: 800px;display:inline-block; float: left !important;">
<div class="easyui-panel" title="权限列表"
style="width: 100%; height: 99%; float: right !important; overflow-y: scroll; background-color: #fff">
<ul>
<input type="checkbox" id="tree_select" name="tree_select"
onclick="allselect()" />
<a>全选或者取消全选</a>
</ul>
<ul id="dgMenu" class="easyui-tree" style="width: 200px"></ul>
</div>
</div>
<script type="text/javascript">
//全选或者取消全选
function allselect(){
var tree_select = $('#tree_select').is(':checked');
var roots = $('#dgMenu').tree('getRoots');//返回tree的所有根节点数组
console.log(tree_select);
if (tree_select==true) {
for ( var i = 0; i < roots.length; i++) {
var node = $('#dgMenu').tree('find', roots[i].id);//查找节点
$('#dgMenu').tree('check', node.target);//将得到的节点选中
}
} else {
for ( var i = 0; i < roots.length; i++) {
var node = $('#dgMenu').tree('find', roots[i].id);
$('#dgMenu').tree('uncheck', node.target);
}
}
}

$('#dgMenu').tree({
checkbox: 'checked',
cascadeCheck: true,
url: '<%=basePath%>user/getMenu.do',
loadFilter: function(data){
console.log(data);
return data;
},
/* onBeforeLoad:function(node,param){
param.categoryId = "13";
} */
});

$("#allotControltable").datagrid({
//var row = $('#xyData_userListlk').datagrid('getSelected');
onClickRow: function (index, row) {
var categoryId=row.tm_SMP;//用户类别ID
//alert("查询已经有的权限======"+categoryId);
$('#dgMenu').tree({
checkbox: true,
cascadeCheck: true,
url: '<%=basePath%>user/getMenu.do?categoryId='+categoryId,
loadFilter: function(data){
return data;
}
});
}

});


//添加用户
$('#allotControlAdd').dialog({
title:'添加用户',
width:'50%',
height:'300px',
iconCls:'icon-add',
closed:true,
closable: true,
draggable: false,
modal: true,
buttons:[ {
text : '保存',
iconCls : 'icon-ok',
handler : function() {
$('#allotControlAddform').form('submit',{
onSubmit:function(){
return $(this).form('enableValidation').form('validate');
},
url:'<%=basePath%>user/allotControlAdd.do',
success : function(data) {
data = eval("(" + data + ")");//JSON字符串转对象
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
$('#allotControlAdd').dialog('close');
$('#allotControltable').datagrid('reload');
},
error: function(){
$.messager.show({
title:'提示',
msg: '添加失败',
showType:'show'
});
}
});
}
}, {
text : '取消',
iconCls : 'icon-cancel',
handler : function() {
$('#allotControlAdd').dialog('close');
}
} ]
});
//修改产品

$('#allotControlUpdate').dialog({
title:'添加用户',
width:'50%',
height:'300px',
iconCls:'icon-add',
closed:true,
closable: true,
draggable: false,
modal: true,
buttons:[ {
text : '保存',
iconCls : 'icon-ok',
handler : function() {
$('#allotControlUpdateform').form('submit',{
onSubmit:function(){
return $(this).form('enableValidation').form('validate');
},
url:'<%=basePath%>user/allotControlUpdate.do',
success : function(data) {
data = eval("(" + data + ")");//JSON字符串转对象
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
$('#allotControlUpdate').dialog('close');
$('#allotControltable').datagrid('reload');
},
error: function(){
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
}
});
}
}, {
text : '取消',
iconCls : 'icon-cancel',
handler : function() {
$('#allotControlUpdate').dialog('close');
}
} ]
});
$('#').dialog('close');
$('#allotControlUpdate').dialog('close');
$('#allotControltable').datagrid({
width: 'auto',
height:'auto',
striped: true,
fit: true,
pagination: true,
scrollbarSize: 0,
singleSelect: true,
url: '<%=basePath%>user/findAllotControl.do',
loadMsg: '数据加载中请稍后……',
columns: [[{
field: 'category_ID',
title: '产品编号',
align: 'center',
resizable: false,
width: '10%'
},{
field: 'remark',
title: '角色名称',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'effect_STS',
title: '类型生效标志',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'tm_SMP',
title: '时间戳',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'upd_OPER',
title: '维护操作员',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'org_NO',
title: '机构编号',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'del_STATUS',
title: '删除状态',
align: 'center',
resizable: false,
width: '15%'
}
]],
method: 'post',
toolbar: [{
text:'添加',
iconCls: 'icon-edit',
handler: function(){
$('#allotControlAddform').form('clear');
$('#allotControlAdd').dialog('open').dialog('setTitle', '添加产品');
$("#EFFECT_STS").val(Array('1'))
}
},'-',{
text:'修改',
iconCls: 'icon-help',
handler: function(){
var row=$('#allotControltable').datagrid('getSelected');
if(row){

$('#allotControlUpdateform').form('load',row);
$('#remark1').val(row.remark);
$('#tm_SMP1').val(row.tm_SMP);
$('#effect_STS1').val(row.effect_STS);
//alert(row.remark+"--"+row.tm_SMP+"--"+row.effect_STS)

$('#allotControlUpdate').dialog('open').dialog('setTitle', '添加产品');

}else{
$.messager.show({
title:'提示',
msg: '至少选择一条',
showType:'show'
});
}

}
},'-',{
text:'删除',
iconCls: 'icon-help',
handler: function(){
var row=$('#allotControltable').datagrid('getSelected');
if(row){
$.messager.confirm('删除数据', '您确定删除此用户吗?', function(r){
if (r){
$.post('<%=basePath%>user/deleteAllotControltable.do?TM_SMP=' + row.tm_SMP+"&CATEGORY_ID="+ row.tm_SMP,
function (result) {
$.messager.show({
title:'提示',
msg: result.msg,
showType:'show'
});
$('#allotControltable').datagrid('reload');

},'json');
}
});

}else{
$.messager.show({
title:'提示',
msg: '至少选择一条',
showType:'show'
});
}

}
},'-',{
text:'保存权限',
iconCls: 'icon-help',
handler: function(){
var row=$('#allotControltable').datagrid('getSelected');

if(row){
//获取选中的树状结构项
var nodes = $('#dgMenu').tree('getChecked', ['checked','indeterminate']);

console.log('nodes=='+nodes);
var checkNod='';
for(var i=0;i<nodes.length;i++){
if(i==nodes.length-1){
checkNod+=nodes[i].id;
}else{
checkNod+=nodes[i].id+',';
}
}
console.log('checkNod=='+checkNod);
$.messager.confirm('保存权限', '确认保存此权限吗?', function(r){
$.post('<%=basePath%>user/saveMenus.do?checkNod=' + checkNod+"&CATEGORY_ID="+ row.tm_SMP+'&UPD_OPER='+row.upd_OPER,
function(result){
$.messager.show({
title:'提示',
msg: result.msg,
showType:'show'
});
},'json')
})
}else{
$.messager.show({
title:'提示',
msg: '至少选择一条',
showType:'show'
});
}

}
}

]
});

var p = $('#allotControltable').datagrid('getPager');
$(p).pagination({
pageSize : 10,//每页显示的记录条数,默认为10
pageList : [10, 20, 30],//可以设置每页记录条数的列表
beforePageText : '第',//页数文本框前显示的汉字
afterPageText : '页 共 {pages} 页',
displayMsg : '当前显示 {from} - {to} 条记录 共 {total} 条记录',
});
</script>
</body>
</html>

jsp基本页面===========

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<meta charset="utf-8">
<link href="<%=basePath%>css/themes/default/easyui.css" rel="stylesheet" type="text/css"/>
<%-- <link href="<%=basePath%>css/themes/icon.css" rel="stylesheet" type="text/css"/> --%>
<link href="<%=basePath%>css/themes/color.css" rel="stylesheet" type="text/css"/>
<%-- <link href="<%=basePath%>css/themes/mobile.css" rel="stylesheet" type="text/css"/> --%>


<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/easyloader.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.mobile.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.parser.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.pagination.js"></script>
<script type="text/javascript" src="<%=basePath%>js/plugins/jquery.form.js"></script>
<style type="text/css">
#producttable{
width: 90%;
border-collapse:separate; border-spacing:0px 20px;
}
#producttable input{
height:32px;
}
</style>

</head>
<body>

<div style="height: 800px;margin-top: 35px;">
<table id="listtable">

</table>
</div>
<!-- 添加产品 -->
<div id="addproduct">
<form id="addproductform" enctype="multipart/form-data" >
<table id="producttable">
<tr>
<td align="right">生产人: </td>
<td>
<input id="creat_pepole" name="creat_pepole"></input>
</td>
<td align="right">产品名称:</td>
<td>
<input id="product_name" name="product_name"></input>
</td>
</tr>
<tr>
<td align="right">生产时间: </td>
<td>
<input id="creat_time" name="creat_time" class="easyui-datebox" required="required"></input>
</td>
<td align="right">产品数量:</td>
<td>
<input id="product_count" name="product_count"></input>
</td>
</tr>
<tr>
<td align="right">生产编号: </td>
<td>
<input id="creat_num" name="creat_num"></input>
</td>
<td align="right">生产地址:</td>
<td>
<input id="product_addres" name="product_addres"></input>
</td>
</tr>
<tr>
<td align="right">保质期: </td>
<td>
<select id="save_time" name="save_time" style="width: 170px;height: 32px;">
<option value="5" selected="selected">5</option>
<option value="10">10</option>
<option value="15">15</option>
</select>
</td>
<td align="right">上传附件: </td>
<td>
<input type="file" onchange="upload()" name="download" ></input>
</td>
</tr>
<tr>
<td align="right">文件路径: </td>
<td>
<input name="filePath" id="filePath" type="text" readonly="readonly"></input>
</td>
<td align="right">上传附件: </td>
<td>
<input type="text" name="myfiles" id="myfiles" readonly="readonly"></input>
</td>
</tr>
</table>
</form>
</div>
<!-- 修改产品 -->
<div id="updateproduct">
<form id="updateproductform">
<table id="producttable">
<tr>
<td align="right">生产人: </td>
<td>
<input id="creat_pepole" name="creat_pepole"></input>
</td>
<td align="right">单位类别:</td>
<td>
<input id="product_name" name="product_name"></input>
</td>
</tr>
<tr>
<td align="right">生产时间: </td>
<td>
<input id="creat_time" name="creat_time" class="easyui-datebox" required="required"></input>
</td>
<td align="right">产品数量:</td>
<td>
<input id="product_count" name="product_count"></input>
</td>
</tr>
<tr>
<td align="right">生产编号: </td>
<td>
<input id="creat_num" name="creat_num"></input>
</td>
<td align="right">生产地址:</td>
<td>
<input id="product_addres" name="product_addres"></input>
</td>
</tr>
<tr>
<td align="right">保质期: </td>
<td>
<select id="save_time" name="save_time" style="width: 170px;height: 32px;">
<option value="5" selected="selected">5</option>
<option value="10">10</option>
<option value="15">15</option>
</select>
</td>
<td align="right">上传附件: </td>
<td>
<input type="text" name="myfiles" id="myfilesdown" readonly="readonly"></input>
</td>
</tr>
<tr>
<td align="right">文件路径: </td>
<td>
<input name="filePath" id="filePathdown" type="text" readonly="readonly"></input>
</td>
<td align="right">下载: </td>
<td>
<input value="下载" type="button" onclick="download()"></input>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
function download(){
var fileName=$('#myfilesdown').val();
var filePathdown=$('#filePathdown').val();
if(null!=fileName&&""!=fileName){
window.location.href="<%=basePath%>file/download.do?fileName="+fileName;
}
}

function upload(){

//var myfiles =$('#myfiles').val();
var fomdata=new FormData($('#addproductform')[0])
//alert('进来看看fomdata=='+fomdata)

$.ajax({
url:'<%=basePath%>file/fileUpload.do',//地址
data:fomdata,
type:'post',//类型
cache:false,
processData:false,
contentType:false,
//请求成功
success:function(data){
//alert(data.fileName);
var filePath=data.filePath;
$("#filePath").val(filePath);
$("#myfiles").val(data.fileName);

},
//失败/超时
error:function(XMLHttpRequest,textStatus,errorThrown){
if(textStatus==='timeout'){
alert('請求超時');
setTimeout(function(){
alert('重新请求');
},2000);
}
//alert(errorThrown);
}
})
<%-- window.location.href="<%=basePath%>files/toUpload.do"; --%>
}

//设置日期格式
$.fn.datebox.defaults.formatter = function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
return y+'-'+m+'-'+d;
}

//添加用户
$('#addproduct').dialog({
title:'添加用户',
width:'50%',
height:'600px',
iconCls:'icon-add',
closed:true,
closable: true,
draggable: false,
modal: true,
buttons:[ {
text : '保存',
iconCls : 'icon-ok',
handler : function() {
$('#addproductform').form('submit',{
onSubmit:function(){
return $(this).form('enableValidation').form('validate');
},
url:'<%=basePath%>product/addProduct.do',
success : function(data) {
data = eval("(" + data + ")");//JSON字符串转对象
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
$('#addproduct').dialog('close');
$('#listtable').datagrid('reload');
},
error: function(){
$.messager.show({
title:'提示',
msg: '添加失败',
showType:'show'
});
}
});
}
}, {
text : '取消',
iconCls : 'icon-cancel',
handler : function() {
$('#addproduct').dialog('close');
}
} ]
});
//修改产品

$('#updateproduct').dialog({
title:'添加用户',
width:'50%',
height:'600px',
iconCls:'icon-add',
closed:true,
closable: true,
draggable: false,
modal: true,
buttons:[ {
text : '保存',
iconCls : 'icon-ok',
handler : function() {
$('#updateproductform').form('submit',{
onSubmit:function(){
return $(this).form('enableValidation').form('validate');
},
url:'<%=basePath%>product/supdateProduct.do',
success : function(data) {
alert(data)
data = eval("(" + data + ")");//JSON字符串转对象
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
$('#updateproduct').dialog('close');
$('#listtable').datagrid('reload');
},
error: function(){
$.messager.show({
title:'提示',
msg: data.msg,
showType:'show'
});
}
});
}
}, {
text : '取消',
iconCls : 'icon-cancel',
handler : function() {
$('#updateproduct').dialog('close');
}
} ]
});
$('#addproduct').dialog('close');
$('#updateproduct').dialog('close');
$('#listtable').datagrid({
width: 'auto',
height:'auto',
striped: true,
fit: true,
pagination: true,
scrollbarSize: 0,
singleSelect: true,
url: '<%=basePath%>product/findProductList.do',
loadMsg: '数据加载中请稍后……',
columns: [[{
field: 'product_no',
title: '产品编号',
align: 'center',
resizable: false,
width: '10%'
},{
field: 'product_name',
title: '产品名',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'creat_time',
title: '生产日期',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'product_count',
title: '产品数量',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'creat_num',
title: '生产编号',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'product_addres',
title: '生产地址',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'creat_pepole',
title: '生产人',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'save_time',
title: '保质期',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'myfiles',
title: '文件名称',
align: 'center',
resizable: false,
width: '15%'
}, {
field: 'filePath',
title: '文件路径',
align: 'center',
resizable: false,
width: '15%'
}
]],
method: 'post',
toolbar: [{
text:'添加',
iconCls: 'icon-edit',
handler: function(){
$('#addproductform').form('clear');
$('#addproduct').dialog('open').dialog('setTitle', '添加产品');
$("#save_time").val(Array('5'))
}
},'-',{
text:'修改',
iconCls: 'icon-help',
handler: function(){
var row=$('#listtable').datagrid('getSelected');
if(row){

$('#updateproductform').form('load',row);
$('#updateproduct').dialog('open').dialog('setTitle', '添加产品');

}else{
$.messager.show({
title:'提示',
msg: '至少选择一条',
showType:'show'
});
}

}
},'-',{
text:'删除',
iconCls: 'icon-help',
handler: function(){
var row=$('#listtable').datagrid('getSelected');
if(row){
$.messager.confirm('删除数据', '您确定删除此用户吗?', function(r){
if (r){
$.post('<%=basePath%>product/deleteProduct.do?product_no=' + row.product_no,
function (result) {
$.messager.show({
title:'提示',
msg: result.msg,
showType:'show'
});
$('#listtable').datagrid('reload');

},'json');
}
});

}else{
$.messager.show({
title:'提示',
msg: '至少选择一条',
showType:'show'
});
}

}
}]
});

var p = $('#listtable').datagrid('getPager');
$(p).pagination({
pageSize : 10,//每页显示的记录条数,默认为10
pageList : [10, 20, 30],//可以设置每页记录条数的列表
beforePageText : '第',//页数文本框前显示的汉字
afterPageText : '页 共 {pages} 页',
displayMsg : '当前显示 {from} - {to} 条记录 共 {total} 条记录',
});
</script>
</body>
</html>

easyui框架 jsp页面的更多相关文章

  1. easyui框架对tab的限制提示

    使用easyui框架如果页面打开太多可能导致页面加载缓慢的问题,下面我们看看代码怎么写: var $tab = $('#tabs'); var tabCount = $tab.tabs('tabs') ...

  2. 【SSH网上商城项目实战03】使用EasyUI搭建后台页面框架

    转自:https://blog.csdn.net/eson_15/article/details/51312490 前面两节,我们整合了SSH并且抽取了service和action部分的接口,可以说基 ...

  3. 解决JSP页面无法使用EasyUI里面class="easyui-dialog"的问题

    当使用MyEclipse新建一个JSP页面的时候,MyEclipse会自动添加一些标记,这些标记也许不一定会在工程中使用到.比如<base href="<%=basePath%& ...

  4. 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码]

    原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码] 开始,我们有了一系列的解决方案,我们将动手搭建新系统吧. 用 ...

  5. Java项目在jsp页面中引入jquery框架的步骤

    环境:在Java  web项目中引入juqery框架 工具:MyEclipse8.5 [步骤如下] A:新建一个Java web项目TestJquery,在WebRoot目录下创建一个jquery文件 ...

  6. 关于SSM框架项目中jsp页面EL表达式使用的一些疑问(一)

    问题 ssm框架整合中,jsp页面中EL表达式所引用的对象“page”可以在controller中使用mav.addObject(“page”,pag )进行添加,如果省略mav.addObject( ...

  7. SSM框架练习之Jsp页面使用taglib标签报错500的问题

    最近在练手一个SSM的基于AdminLET框架模板的后台管理系统,使用的环境是tomcat9,使用Maven构建并通过添加Web模板框架的项目,在添加完所有的配置文件后启动tomcat运行,出现了一个 ...

  8. SpringMVC框架下实现JSON(类方法中回传数据到jsp页面,使用jQuery方法回传)

    JSON的实现,即将需要的数据回传到jsp页面: 1>.加入实现Json的三个架包到lib中:2>.目标方法上边加入注解,需要返回的值3>.在jsp页面中书写jQuery方法: ec ...

  9. struts框架中OGNL表达式的使用之jsp页面获取action中的属性值

    在jsp页面中获取action中的值: 1.写一个action类OgnlAction类: 需要注意的地方: 如果在aciton中直接使用ognl表达式,将值存储的值栈中,是不能通过跳转将值传到jsp页 ...

随机推荐

  1. 6.2 Binding基础

    WPF最为核心的思想是数据驱动UI,实现这一技术的基石就是绑定技术(binding).如果把Binding比作数据的桥梁,那么它的两端分别是源(Source)和目标(Target),Binging是架 ...

  2. LeetCode 035 Search Insert Position

    题目要求:Search Insert Position Given a sorted array and a target value, return the index if the target ...

  3. ScheduledThreadPoolExecutor源码分析-你知道定时线程池是如何实现延迟执行和周期执行的吗?

    Java版本:8u261. 1 简介 ScheduledThreadPoolExecutor即定时线程池,是用来执行延迟任务或周期性任务的.相比于Timer的单线程,定时线程池在遇到任务抛出异常的时候 ...

  4. RestTemplate 统一添加 Header

    一.添加拦截器 public class HeaderRequestInterceptor implements ClientHttpRequestInterceptor { private fina ...

  5. 第十三章 Python基础篇结束章

    从2019年3月底开始学习Python,4月份开始在CSDN发博客,至今不到半年,老猿认为博客内容中关于Python基础知识的内容已经基本告一段落,本章进入Python基础知识结束章节,对Python ...

  6. DokcerFile的添加及如何生成一个自定义镜像mycentos(四)

    最近在学习Docker,用commit去生成一个镜像,但是生成后的镜像非常臃肿,所以去学习了一下DockerFile. 前提条件: 已在虚拟机中成功安装Docker 简单的理解可以如下图所示: Doc ...

  7. python——sklearn完整例子整理示范(有监督,逻辑回归范例)(原创)

    sklearn使用方法,包括从制作数据集,拆分数据集,调用模型,保存加载模型,分析结果,可视化结果 1 import pandas as pd 2 import numpy as np 3 from ...

  8. Springcloud之gateway配置及swagger集成

    前言 关于引入gateway的好处我网上找了下: 性能:API高可用,负载均衡,容错机制. 安全:权限身份认证.脱敏,流量清洗,后端签名(保证全链路可信调用),黑名单(非法调用的限制). 日志:日志记 ...

  9. 【题解】P3631 [APIO2011]方格染色

    很有意思的一道题,所以单独拿出来了. 完整分享看 这里 题目链接 luogu 题意 有一个包含 \(n \times m\) 个方格的表格.要将其中的每个方格都染成红色或蓝色.表格中每个 \(2 \t ...

  10. 模块urllib requests json xml configparser 学习笔记

    发起http请求 获取返回值 返回值是字符串 第三方模块安装 pip install requests 返回值格式 xml  html  jaon json 功能  loads   字符串>&g ...