Java存储图片到Mysql
【1】视图层
<link href="${ctx}/Content/layui/css/layui.css" rel="stylesheet" />
<form class="layui-form" id="fruserInfor" method="post" enctype="multipart/form-data"
action="${ctx}/web/UserInforServlet?method=userInforServlet" >
<div class="layui-form-item" >
<label class="layui-form-label label-txt"></label>
<img src="http://m.zhengjinfan.cn/images/0.jpg" class="layui-nav-img layui-upload-img" id="userImge" name="userImge" >
<button type="button" class="layui-btn" id="upImage"><i class="layui-icon"></i>更换头像</button>
</div>
<div class="layui-form-item" style="margin: 0px 0px 0px 100px;">
<div class="layui-input-block">
<button class="layui-btn" id="saveUserInfor">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<script src="${ctx}/Content/jquery-3.3.1/jquery-3.2.1.min.js"></script>
<script src="${ctx}