form提交地址地址正确但是依旧报错404找不到路径
---恢复内容开始---
我的jsp中保含了“>=”和“<=”符号,form提交的时候会有个标签校验,如下:
private static boolean validateRequestParam(HttpServletRequest request,
HttpServletResponse response) {
boolean checkFlag = true;
Pattern SCRIPT_PATTERN = Pattern.compile("<script.*>.*<\\/script\\s*>");
Pattern IFRAME_PATTERN = Pattern.compile("javascript:*");
Pattern HTML_PATTERN = Pattern.compile("<[^>]+>");//标签校验
response.setCharacterEncoding("UTF-8");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0L);
Map paramMap = request.getParameterMap();
String lowStr = null;
Iterator itr = paramMap.keySet().iterator();
while (itr.hasNext()) {
String ok = (String) itr.next();
String[] value = (String[]) paramMap.get(ok);
for (int k = 0; k < value.length; ++k) {
lowStr = value[k];
/*Matcher mHtml = HTML_PATTERN.matcher(lowStr);
if (mHtml.find()) {
checkFlag = false;
}*/
Matcher m = SCRIPT_PATTERN.matcher(lowStr);
if (m.find()) {
checkFlag = false;
}
Matcher iframeMatcher = IFRAME_PATTERN.matcher(lowStr);
if (iframeMatcher.find()) {
checkFlag = false;
}
if ((lowStr.contains("ascii(")) || (lowStr.contains("ascii ("))
|| (lowStr.contains("chr("))
|| (lowStr.contains("chr ("))) {
checkFlag = false;
}
if ((!(lowStr.contains("alter ")))
&& (!(lowStr.contains("create ")))
&& (!(lowStr.contains("truncate ")))
&& (!(lowStr.contains("drop ")))
&& (!(lowStr.contains("lock table")))
&& (!(lowStr.contains("insert ")))
&& (!(lowStr.contains("update ")))
&& (!(lowStr.contains("delete ")))
&& (!(lowStr.contains("select ")))
&& (!(lowStr.contains("grant "))))
continue;
checkFlag = false;
}
}
return checkFlag;
}
当我的form提交之后就会报错404路径找不到,其实路径地址是正确的。之所以会报错404是因为你的form中包含了<>,在校验的时候会认为这是一套标签过滤掉,上述校验不通过,所以会报错404。

我的jsp代码如下:
<script type="text/javascript">
//window.name="curWindow";
//init page
$(function() {
var input_flag = $("#inputFlag").val();
if (input_flag == "end") {
$("input:not([id='close'])").attr("disabled", true);
$("select").attr("disabled", true);
$("textarea").attr("disabled", true);
} else if (input_flag == "det") {
$("input:not([id='close'])").attr("disabled", true);
$("select").attr("disabled", true);
$("textarea").attr("disabled", true);
} else if (input_flag == "upd") {
$("#rulecode").attr("disabled", true);
$("select").attr("disabled", true);
}
});
//add button
function add() {
//alert(67);
$("#rulecode").attr("disabled", false);
$("select").attr("disabled", false);
var form = document.getElementById("form");
var input_flag = $("#inputFlag").val();
//var analyseParameter = "";
//var count = document.getElementsByName("paramValue");
var set = document.getElementsByName("operators");
var name = document.getElementsByName("paramName");
var analyseParameter = "";
//取出paramValue
var arr = new Array();
for (var m = 0; m < name.length; m++) {
arr[m] = document.getElementById(name[m].value);
}
var count = arr;
for (var i = 0; i < count.length; i++) {
if (i == count.length - 1) {
analyseParameter += name[i].value + ":" + set[i].value + ":"
+ count[i].value;
break;
}
analyseParameter += name[i].value + ":" + set[i].value + ":"
+ count[i].value + "|";
}
if ('add' == input_flag) {
//给form的analyseParameter赋值
alert(analyseParameter);
console.log(analyseParameter);
document.getElementById("analyseparameter").value = analyseParameter;
alert(document.getElementById("analyseparameter").value);
form.action = "${pageContext.request.contextPath}/DATA_Analyse_Set/Add";
alert(form.action);
} else if ('upd' == input_flag) {
form.action = "${pageContext.request.contextPath}/DATA_Analyse_Set/Upd?dataAnaylse.analyseParameter="
+ analyseParameter;
}
form.submit();
}
function test() {
alert(1);
var count = document.getElementsByName("paramValue");
var set = document.getElementsByName("operators");
var name = document.getElementsByName("paramName");
var a = "";
for (var i = 0; i < count.length; i++) {
if (i == count.length - 1) {
a += name[i].value + ":" + set[i].value + ":" + count[i].value;
break;
}
a += name[i].value + ":" + set[i].value + ":" + count[i].value
+ "|";
}
alert(a);
console.log(a);
}
//add by li_senbin_2017.3.23
var val;
function setStatus(checkobj, obj) {
var status = $(checkobj).prop("checked");
if (status) {
$('#' + obj).val(val);
$('#' + obj + 'Desc').val('');
$('#' + obj).attr('disabled', false);
$('#' + obj + 'Desc').attr('disabled', false);
} else {
val = $('#' + obj).val();
$('#' + obj).val('not use');
$('#' + obj + 'Desc').val('not use');
$('#' + obj).attr('disabled', true);
$('#' + obj + 'Desc').attr('disabled', true);
}
}
function tradeWhere() {
showTradeWhither([ {
"tradeWhither" : "param1"
} ],1);
}
function tradeP() {
showTradeWhither([ {
"tradePlace" : "param1"
} ],2);
}
</script>
<!-- tips information -->
<div id="id_showMsg" style="display: none">
<br /> <br />
<div id="id_result">
<t:messagePanel messagesAttributeName="errmsg" messagesType="error" />
<t:messagePanel messagesAttributeName="infomsg" messagesType="info" />
<t:messagePanel messagesAttributeName="successmsg"
messagesType="success" />
<spring:hasBindErrors name="DATA_Analyse_SetForm">
<form:form commandName="DATA_Analyse_SetForm">
<div class="alert alert-error">
<form:errors path="*" cssStyle="color:red"></form:errors>
</div>
</form:form>
</spring:hasBindErrors>
</div>
<br />
</div>
<!-- title -->
<div class="page_title">
<spring:message code="aml.title.data_analyse_set.add" />
</div>
<!-- body -->
<div class="row" style="margin-bottom: 40px;">
<form:form id="form"
action="${pageContext.request.contextPath}/DATA_Analyse_Set/Insert"
method="post" modelAttribute="DATA_Analyse_SetForm"
class="form-horizontal">
<form:hidden path="inputFlag" id="inputFlag" htmlEscape="true" />
<table class="tbl_search">
<tr>
<td colspan="4"><div class="page_title">
<spring:message code="bh_03.label.BaseInfo" />
</div></td>
</tr>
<tr>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.data_analyse_set.rulecode" /></td>
<td><form:input id="rulecode" path="ruleCode" type="text"
class=".input-small" maxlength="30" /></td>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.data_analyse_set.ruletype" /></td>
<td><form:select path="ruleType">
<form:option value="" ></form:option>
<form:options items="${AML_RULE_TYPE_LIST}" />
</form:select></td>
</tr>
<tr>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.data_analyse_set.rulenotes" /></td>
<td colspan="3"><form:textarea rows="3" style="width:86%"
id="ruleNotes" path="ruleNotes" class=".input-small" /></td>
</tr>
<tr style="display: none">
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.data_analyse_set.analyseparameter" /></td>
<td colspan="3"><form:textarea rows="4" style="width:86%"
id="analyseparameter" path="analyseParameter" class=".input-small" /></td>
</tr>
</table>
<tr>
<td colspan="4"><div class="page_title">
<spring:message code="aml.label.data_analyse_set.analyseparameter" />
</div></td>
</tr>
<table
class="table table-striped table-bordered table-condensed tbl_page">
<thead>
<tr>
<th width="20px" style="text-align: left">No.</th>
<th class="tbl_page_th" width="150px"><spring:message
code="aml.label.dataanaylse.paramCnName" /></th>
<th class="tbl_page_th" width="230px"><spring:message
code="aml.label.dataanaylse.paramValue" /></th>
<th class="tbl_page_th" width="300px"><spring:message
code="aml.label.dataanaylse.paramDesc" /></th>
<th class="tbl_page_th" width="40px"><spring:message
code="aml.label.dataanaylse.paramEnable" /></th>
</tr>
</thead>
<tbody>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="countObj">
<td width="20px">1</td>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.dataanaylse.countObj" /></td>
<td><form:select path="countObj" name="paramValue"
id="countObj">
<form:option value="0">
<spring:message code="aml.label.dataanaylse.formInput.customer" />
</form:option>
<form:option value="1">
<spring:message code="aml.label.dataanaylse.formInput.account" />
</form:option>
<form:option value="2">
<spring:message code="aml.label.dataanaylse.formInput.trade" />
</form:option>
</form:select></td>
<td><form:input id="countObjDesc" path="countObjDesc"
type="text" class=".input-small" maxlength="30" value="数据统计对象" /></td>
<td align="center"><input type="checkbox" disabled="disabled"
onclick="setStatus(this,'countObj')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="like">
<input type="hidden" name="paramName" value="tradeType">
<td width="20px">2</td>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.dataanaylse.tradeType" /></td>
<td><form:select path="tradeType" name="paramValue"
id="tradeType">
<form:option value=""></form:option>
<form:options items="${AML_RULE_TRADE_TYPE_LIST}" />
</form:select></td>
<td><form:input id="tradeTypeDesc" path="tradeTypeDesc"
type="text" class=".input-small" maxlength="30" value="01-转账;00-现金" /></td>
<td align="center"><input type="checkbox" disabled="disabled"
onclick="setStatus(this,'tradeType')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="termLength">
<td width="20px">3</td>
<td class="label_td">
<!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.termLength" />
</td>
<td><form:input id="termLength" path="termLength" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="termLengthDesc" path="termLengthDesc"
type="text" class=".input-small" maxlength="30" value="数据统计期间,单位:天" /></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'termLength')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="reportRequire">
<td width="20px">4</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.reportRequire" /></td>
<td><form:select path="reportRequire" name="paramValue"
id="reportRequire">
<form:option value=""></form:option>
<form:options items="${AML_IF_RPT_LIST}" />
</form:select></td>
<td><form:input id="reportRequireDesc"
path="reportRequireDesc" type="text" class=".input-small"
maxlength="30" value="1:是 0:否 "/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'reportRequire')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="ruleWeighe">
<td width="20px">5</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.ruleWeighe" /></td>
<td><form:input id="ruleWeighe" path="ruleWeighe" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="ruleWeigheDesc" path="ruleWeigheDesc"
type="text" class=".input-small" maxlength="30" value="权重:0-1"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'ruleWeighe')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="ruleScore">
<td width="20px">6</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.ruleScore" /></td>
<td><form:input id="ruleScore" path="ruleScore" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="ruleScoreDesc" path="ruleScoreDesc"
type="text" class=".input-small" maxlength="30" value="分值:0-100"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'ruleScore')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value=">=">
<input type="hidden" name="paramName" value="tradeTimes">
<td width="20px">7</td>
<td class="label_td">
<!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.tradeTimes" />
</td>
<td><form:input id="tradeTimes" path="tradeTimes" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="tradeTimesDesc" path="tradeTimesDesc"
type="text" class=".input-small" maxlength="30" value="交易笔数大于等于对应值"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'tradeTimes')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="in">
<input type="hidden" name="paramName" value="customerType">
<td width="20px">8</td>
<td class="label_td"><font color="red">*</font> <spring:message
code="aml.label.dataanaylse.customerType" /></td>
<td><form:select path="customerType" name="paramValue"
id="customerType">
<form:option value=""></form:option>
<form:options items="${AML_RULE_CUSTOMER_TYPE_LIST}" /><%--edit by hlp 20170705 --%>
</form:select></td>
<td><form:input id="customerTypeDesc" path="customerTypeDesc"
type="text" class=".input-small" maxlength="30" value="客户类型"/></td>
<td align="center"><input type="checkbox" disabled="disabled"
onclick="setStatus(this,'customerType')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value=">=">
<input type="hidden" name="paramName" value="tradeDays">
<td width="20px">9</td>
<td class="label_td">
<!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.tradeDays" />
</td>
<td><form:input id="tradeDays" path="tradeDays" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="tradeDaysDesc" path="tradeDaysDesc"
type="text" class=".input-small" maxlength="30" value="连续交易天数"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'tradeDays')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="repayFlag">
<td width="20px">11</td>
<td class="label_td">
<!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.repayFlag" />
</td>
<td><form:input id="repayFlag" path="repayFlag" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="repayFlagDesc" path="repayFlagDesc"
type="text" class=".input-small" maxlength="30" value="提前还款标志"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'repayFlag')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="in">
<input type="hidden" name="paramName" value="paperType">
<td width="20px">12</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.paperType" /></td>
<td><form:select id="paperType" name="paramValue"
path="paperType">
<form:option value=""></form:option>
<form:options items="${AML_PAPER_TYPE_LIST}" />
</form:select></td>
<td><form:input id="paperTypeDesc" path="paperTypeDesc"
type="text" class=".input-small" maxlength="30" value="客户证件类型"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'paperType')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="vocationType">
<td width="20px">13</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.vocationType" /></td>
<td><form:input id="vocationType" path="vocationType" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="vocationTypeDesc" path="vocationTypeDesc"
type="text" class=".input-small" maxlength="30" value="职业/经营范围"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'vocationType')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="like">
<input type="hidden" name="paramName" value="customerAddress">
<td width="20px">14</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.customerAddress" /></td>
<td><form:input id="customerAddress" path="customerAddress" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="customerAddressDesc" path="customerAddressDesc"
type="text" class=".input-small" maxlength="30" value="客户住址"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'customerAddress')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value="=">
<input type="hidden" name="paramName" value="paperCode">
<td width="20px">15</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.paperCode" /></td>
<td><form:input id="paperCode" path="paperCode" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="paperCodeDesc" path="paperCodeDesc"
type="text" class=".input-small" maxlength="30" value="客户证件号码"/></td>
<td align="center"><input type="checkbox" id="checkbox"
onclick="setStatus(this,'paperCode')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
<tr>
<input type="hidden" name="operators" value=">=">
<input type="hidden" name="paramName" value="registrationMoney">
<td width="20px">16</td>
<td class="label_td"><!-- <font color="red">*</font> --> <spring:message
code="aml.label.dataanaylse.registrationMoney" /></td>
<td><form:input id="registrationMoney" path="registrationMoney" type="text"
class=".input-small" maxlength="30" /></td>
<td><form:input id="registrationMoneyDesc" path="registrationMoneyDesc"
type="text" class=".input-small" maxlength="30" value="注册资金大于等于当前值"/></td>
<td align="center"><input type="checkbox"
onclick="setStatus(this,'registrationMoney')" checked="checked"
class=".input-small" maxlength="30" /></td>
</tr>
</tbody>
</table>
</form:form>
</div>
<div class="row">
<div class="navbar navbar-fixed-bottom text-right" id="footer"
style="margin-bottom: 0px; line-height: 30px; opacity: 0.9;">
<input id="confirmBtn" type="button" class="btn btn-primary"
onclick="add()" value="<spring:message code="button.lable.Submit"/>">
<input id="close" type="button" class="btn btn-primary"
onclick="javascript: window.close();"
value="<spring:message code="button.lable.close"/>">
<%-- <input
id="close" type="button" class="btn btn-primary" onclick="add()"
value="测试"> --%>
</div>
</div>
---恢复内容结束---
form提交地址地址正确但是依旧报错404找不到路径的更多相关文章
- 关于idea中,web项目启动tomcat,访问资源报错404
背景: web项目启动tomcat,访问相应的资源,报错404,前提资源路径是没错的. 原因: 1.确定是不是web项目 不是的话: 配置web-inf的路径和webroot(web根目录)的路径 2 ...
- 【前台 ajax】前台ajax请求,地址正确,但是报错不进入后台
前台ajax请求,地址正确,但是报错不进入后台 出现上述问题,可能的情况是 1.ajax用的post,而后台限定用get,或者所有的post请求都被拦截,所以不能正常进入并且报错403 @Reques ...
- asp.net使用post方式action到另一个页面,在另一个页面接受form表单的值!(报错,已解决!)
原文:asp.net使用post方式action到另一个页面,在另一个页面接受form表单的值!(报错,已解决!) 我想用post的方式把一个页面表单的值,传到另一个页面.当我点击Default.as ...
- Anaconda3-更换为清华源后依旧报错CondaHTTPError: HTTP 000 CONNECTION FAILED
前言 今天发现换完清华源以后依旧报错 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsi.. ...
- angular4.0项目build发布后,刷新页面报错404
angular4.0项目执行npm run build后,进入页面正常显示. 但是当刷新页面时,报错404,页面未找到. 出现这个问题的原因,应该是找不到路由地址导致的,然后找到了下面的解决方案. 找 ...
- Spring MVC 入门实例报错404的解决方案
若启动服务器控制台报错,并且是未找到xml配置文件,初始化DispatchServlet失败,或者控制台未报错404,那么: 1.URL的排查: 格式-----------协议名://地址:端口号/上 ...
- IIS7配置PHP 报错 "对找不到的文件启用文件监视"
原文 IIS7配置PHP5.4报错对找不到的文件启用文件监视怎么解决? 案例环境:windows2008+IIS7+PHP5.4+ZEND LOADER用户在配置后遇到报错:错误摘要 HTTP 错误 ...
- 引用AForge.video.ffmpeg,打开时会报错:找不到指定的模块,需要把发行包第三方文件externals\ffmpeg\bin里的dll文件拷到windows的system32文件夹下。
引用AForge.video.ffmpeg,打开时会报错:找不到指定的模块,需要把发行包第三方文件externals\ffmpeg\bin里的dll文件拷到windows的system32文件夹下. ...
- vue2.0 项目build后资源文件报错404的解决方案
当vue项目build后,我们会看到css.js报错404的问题: 那我们就去找错误原因吧. 首先,查看build后的dist文件目录 可以看出,js.css在index.html的同级目录下: 然后 ...
随机推荐
- 应用程序PING发出的是什么报文?
Ping位于用户层,一般用来测试一台主机是否可达,该程序发送一份ICMP回显请求报文给主机,并等待返回ICMP回显 应答
- angular学习-01,使用第三方库(jquery...)
开发环境(window) 1.安装node https://nodejs.org/en/ 2.安装angular-cli npm install -g @angular/cli 3.使用ng new ...
- 21.Linux-写USB键盘驱动(详解)
本节目的: 根据上节写的USB鼠标驱动,来依葫芦画瓢写出键盘驱动 1.首先我们通过上节的代码中修改,来打印下键盘驱动的数据到底是怎样的 先来回忆下,我们之前写的鼠标驱动的id_table是这样: 所以 ...
- 自签名的https证书是不安全的
一.项目内的需求 我们做的app都是企业级的应用,而企业级的应用的下载需要遵循itms协议,itms协议下需要https链接,这就需要你的服务器支持https的协议,该协议需要申请SSL证书,我们测试 ...
- 像 npm 一样在 Andriod 项目中引入 Gradle 依赖
一.前言 作为 Android 开发人员,有没有羡慕过 node.js 的导入三方库的方式,node.js 社区为开发者准备了一个快速可靠的依赖管理库.这样的依赖管理库,让 node.js 导入依赖库 ...
- Cmder 软件中修改λ符号方法
以前的版本 网上都有,我就不介绍了, 只介绍现在的 1. 打开Cmder软件安装位置 2. 打开vendor文件夹 profile.ps1文件 3. 找到第77行 Write-Host " ...
- less使用ch1--认识语法
@charset "utf-8"; //注释------------------------------ /*我是可以被编译出来的*/ //不能被编译出来 //变量-------- ...
- c# 图片转二进制/字符串 二进制/字符串反转成图片
protected void Button1_Click(object sender, EventArgs e) { //图片转二进制 byte[] imageByte = GetPictureDat ...
- 使用jquery-qrcode在页面上生成二维码,支持中文
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- springboot高并发redis细粒度加锁(key粒度加锁)
本文探讨在web开发中如何解决并发访问带来的数据同步问题. 1.需求: 通过REST接口请求并发访问redis,例如:将key=fusor:${order_id} 中的值+1: 2.场景: 设想,多线 ...