Java逻辑分页代码
前台jsp代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>office模版管理</title>
<%@include file="/commons/include/manageCommon.jsp"%>
<link rel="stylesheet" href="${ctx}/assets/stylesheets/thestyle.css" />
<script type="text/javascript"> function showOffice(officeName,officeExt,hideOfficePath){
window.location.href="${ctx}/platform/system/sysOffice/download.ht?officeName="+officeName+"&officeExt="+officeExt+"&hideOfficePath="+hideOfficePath;
} function editOffice(officePath,officeExt){
if(officeExt != "doc" && officeExt != "DOC" && officeExt != "docx" && officeExt != "DOCX"){
layer.msg("请选择doc或docx格式的文书进行编辑!", {
time: 2000,
type: 1,
skin: "layer-tips-box",
anim: 1,
offset: "30%",
content: content1.replace("#tips#", "请选择doc或docx格式的文书进行编辑!")
});
return false;
}
window.location.href = "edit.ht?officePath="+officePath;
} function changePageSize(){
var pageSize = $("#pageSizeSelect option:selected").val();
$("#pageSizeSpan").html(pageSize);
$("#pageSize").val(pageSize);
var currentPage = $("#currentPageInput").val();
$("#currentPage").val(currentPage);
$("#searchForm").submit();
} function first(){
$("#currentPage").val(parseInt(1));
$("#currentPageInput").val(parseInt(1));
$("#searchForm").submit();
} function previous(){
var currentPage = $("#currentPageInput").val();
if(parseInt(currentPage)-1 >= parseInt(1)){
$("#currentPage").val(parseInt(currentPage)-1);
$("#currentPageInput").val(parseInt(currentPage)-1);
}
$("#searchForm").submit();
} function next(){
var currentPage = $("#currentPageInput").val();
if(parseInt(currentPage)+1 <= parseInt("${totalPage}")){
$("#currentPage").val(parseInt(currentPage)+1);
$("#currentPageInput").val(parseInt(currentPage)+1);
}
$("#searchForm").submit();
} function last(){
$("#currentPage").val(parseInt("${totalPage}"));
$("#currentPageInput").val(parseInt("${totalPage}"));
$("#searchForm").submit();
} function jumpTo(){
var currentPage = $("#currentPageInput").val();
$("#currentPage").val(parseInt(currentPage));
$("#searchForm").submit();
}
</script>
</head>
<body>
<div class="panel">
<div class="panel-heading">
<form id="searchForm" method="post" action="list.ht" class="form-inline inputFrom">
<div class="form-group">
<span>文书名称:</span> <input type="text" name="officeName"
class="form-control input-sm" value="${officeName}" />
</div>
<input id="pageSize" name="pageSize" value="${pageSize }" style="display:none"/>
<input id="currentPage" name="currentPage" value="${currentPage }" style="display:none"/>
</form>
</div>
<div class="panel-body">
<c:set var="checkAll">
<input type="checkbox" id="chkall"/>
</c:set>
<display:table name="sysOfficeList" id="sysOfficeItem" requestURI="list.ht" sort="external" cellpadding="1" cellspacing="1"
class="table-grid table table-bordered table-striped table-hover text-center"> <display:caption>
<div class="btn-group-p">
<a class="btn btn-primary link search" id="btnSearch">
<span class="fa fa-search">查询</span>
</a>
<a class="btn btn-primary" href="add.ht">
<span class="fa fa-plus">添加</span>
</a>
<a class="btn btn-primary link del" action="del.ht">
<span class="fa fa-times">批量删除</span>
</a>
</div>
</display:caption> <display:column title="${checkAll}" media="html" style="width:30px;">
<input type="checkbox" class="pk" name="officePath" value="${sysOfficeItem.officePath}">
</display:column>
<display:column title="文书名称" class="text-left">
<%-- <a class="titleTip" title="${sysOfficeItem.officeName}" href="javascript:void(0)" onclick="showOffice('${sysOfficeItem.officeName}','${sysOfficeItem.officeExt}','${sysOfficeItem.hideOfficePath}')"> --%>
<a class="titleTip" title="${sysOfficeItem.officeName}" href="get.ht?officePath=${sysOfficeItem.officePath}">
${fn:substring(sysOfficeItem.officeName,0,10)}${fn:length(sysOfficeItem.officeName)>10?'...':''}
</a>
</display:column>
<display:column title="文书后缀">
${sysOfficeItem.officeExt}
</display:column>
<display:column title="文书路径">
<span class="titleTip" title="${sysOfficeItem.officePath}">
${fn:substring(sysOfficeItem.officePath,0,80)}${fn:length(sysOfficeItem.officePath)>80?'...':''}
</span>
</display:column>
<display:column title="管理" media="html" class="row-nowrap text-center">
<a href="get.ht?officePath=${sysOfficeItem.officePath}" class="link detail gray leave-blank">明细</a>
<a onclick="editOffice('${sysOfficeItem.officePath}','${sysOfficeItem.officeExt}')" href="javascript:void(0)" class="link edit gray leave-blank">编辑</a>
<a href="del.ht?officePath=${sysOfficeItem.officePath}" class="link del gray leave-blank">删除</a>
</display:column>
</display:table>
<div class="btn-group" style="background-color: white;width: 100%">
<div style="float: left;">
<span>每页记录</span>
<select id="pageSizeSelect" name="pageSizeSelect" onchange="changePageSize()" class="input-sm" style="margin: 0 5px;">
<option value="5" <c:out value="${pageSize eq '5'? 'selected' : '' }"/>>5</option>
<option value="10" <c:out value="${pageSize eq '10'? 'selected' : '' }"/>>10</option>
<option value="15" <c:out value="${pageSize eq '15'? 'selected' : '' }"/>>15</option>
<option value="20" <c:out value="${pageSize eq '20'? 'selected' : '' }"/>>20</option>
<option value="50" <c:out value="${pageSize eq '50'? 'selected' : '' }"/>>50</option>
<option value="100" <c:out value="${pageSize eq '100'? 'selected' : '' }"/>>100</option>
</select>
<a href="javascript:window.location.reload()"><span class="fa fa-refresh" style="display: inline-block;margin:0 5px;"></span></a>
<span style="display: inline-block;margin:0 5px;">显示记录从1到<span id="pageSizeSpan" name="pageSizeSpan">10</span>,总数 ${totalNum }条</span>
<a href="javascript:;" onclick="first()" title="首页"><span class="fa fa-step-backward" style="display: inline-block;margin:0 5px;"></span></a>
<a href="javascript:;" onclick="previous();" title="上一页" ><span class="fa fa-chevron-left"></span></a>
<span style="display: inline-block;margin:0 5px;">
<input class="pageInputText" size="4" value="${currentPage}" maxlength="4" type="text" id="currentPageInput" name="currentPageInput" style="width: 35px;border: 1px solid #ddd;height: 24px;line-height: 24px;">/<span style="margin-left:4px;">${totalPage }</span>
</span>
<a href="javascript:;" onclick="next()" title="下一页" ><span class="fa fa-chevron-right" style="display: inline-block;margin:0 5px;"></span></a>
<a href="javascript:;" onclick="last()" title="尾页" ><span class="fa fa-step-forward" style="display: inline-block;margin:0 5px;"></span></a>
<input type="button" id="btnGo" value="GO" onclick="jumpTo();" class="btn btn-primary">
<div class="l-clear"></div>
</div>
</div>
</div><!-- end of panel-body -->
<!-- end of panel -->
</body>
<!-- 提示 -->
<link rel="stylesheet" type="text/css" href="${ctx}/js/poshytip-1.2/tip-yellowsimple/tip-yellowsimple.css" />
<script type="text/javascript" src="${ctx}/js/poshytip-1.2/jquery.poshytip.js"></script>
<script type="text/javascript" src="${ctx}/js/util/toolTipCommon.js"></script>
</html>
后台Java代码如下:
package com.ksource.platform.controller.system; import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.ksource.platform.model.system.SysAuditModelType;
import com.ksource.platform.model.system.SysFile;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.ksource.core.annotion.Action;
import com.ksource.core.annotion.ActionExecOrder;
import com.ksource.core.util.AppConfigUtil;
import com.ksource.core.util.FileUtil;
import com.ksource.core.web.ResultMessage;
import com.ksource.core.web.controller.BaseController;
import com.ksource.core.web.query.QueryFilter;
import com.ksource.core.web.util.RequestUtil;
import com.ksource.platform.service.system.SysFileService;
import com.ksource.pwlp.controller.system.SysOffice; @Controller
@RequestMapping({ "/platform/system/sysOffice/" })
@Action(ownermodel = SysAuditModelType.BASICDATA_MANAGEMENT)
public class SysOfficeController extends BaseController { @Resource
private SysFileService sysFileService; /**
* 查看系统文书模版分页列表
* @param request
* @return
* @throws Exception
*/
@RequestMapping({ "list" })
@Action(description = "查看系统文书模版分页列表", detail = "查看系统文书模版分页列表")
public ModelAndView list(HttpServletRequest request) throws Exception {
QueryFilter filter = new QueryFilter(request, "sysOfficeItem");
String officePath = request.getSession().getServletContext().getRealPath("/")+"WEB-INF/fileTemplate/office";
List<SysOffice> sysOfficeList = new ArrayList<SysOffice>();
findFileList(new File(officePath),sysOfficeList,filter);
//pageSize 每页展示个数
int pageSize = RequestUtil.getInt(request, "pageSize",10);
//currentPage 当前页
int currentPage = RequestUtil.getInt(request, "currentPage",1);
//totalNum 总数
int totalNum = sysOfficeList.size();
//totalPage 总页数
int totalPage = 0;
if(sysOfficeList.size() % pageSize==0){
//说明整除,正好每页显示pageSize条数据,没有多余一页要显示少于pageSize条数据的
totalPage = sysOfficeList.size() / pageSize;
}else{
//不整除,就要在加一页,来显示多余的数据。
totalPage = sysOfficeList.size() / pageSize + 1;
}
List<SysOffice> officeList = new ArrayList<SysOffice>();
for (int i = (currentPage-1)*pageSize; i < currentPage*pageSize; i++) {
if(i < totalNum){
officeList.add(sysOfficeList.get(i));
}
}
ModelAndView mv = getAutoView().addObject("sysOfficeList", officeList).addObject("pageSize", pageSize).addObject("currentPage", currentPage).addObject("totalNum", totalNum).addObject("totalPage", totalPage);
Object obj = filter.getFilters().get("officeName");
if(obj != null){
String officeName = obj.toString();
mv.addObject("officeName", officeName);
}
return mv;
} /**
* 查看系统文书模版明细
* @param request
* @return
* @throws Exception
*/
@RequestMapping({ "get" })
@Action(description = "查看系统文书模版明细", detail = "查看系统文书模版明细")
public ModelAndView get(HttpServletRequest request) throws Exception {
String officePath = RequestUtil.getString(request, "officePath");
SysOffice sysOffice = new SysOffice();
File file = new File(officePath);
if(file != null){
String officeName = file.getName().substring(0, file.getName().lastIndexOf("."));
sysOffice.setOfficeName(officeName);
String officeExt = file.getName().substring(file.getName().lastIndexOf(".")+1, file.getName().length());
sysOffice.setOfficeExt(officeExt);
sysOffice.setOfficePath(officePath);
sysOffice.setHideOfficePath(sysOffice.getOfficePath().replace("\\", "//"));
}
return getAutoView().addObject("sysOffice", sysOffice);
} /**
* 编辑文书模板页面
* @param response
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/add")
@Action(description = "编辑文书模板页面", detail = "编辑文书模板页面")
public ModelAndView add(HttpServletResponse response, HttpServletRequest request) throws Exception {
String officePath = RequestUtil.getString(request, "officePath", "");
SysOffice sysOffice = new SysOffice();
if(!"".equals(officePath)){
File file = new File(officePath);
if(file != null){
String officeName = file.getName().substring(0, file.getName().lastIndexOf("."));
sysOffice.setOfficeName(officeName);
String officeExt = file.getName().substring(file.getName().lastIndexOf(".")+1, file.getName().length());
sysOffice.setOfficeExt(officeExt);
sysOffice.setOfficePath(officePath);
sysOffice.setHideOfficePath(sysOffice.getOfficePath().replace("\\", "//"));
}
}
ModelAndView mv = this.getAutoView();
return mv.addObject("sysOffice", sysOffice);
} /**
* 编辑文书模板页面
* @param response
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/edit")
@Action(description = "编辑文书模板页面", detail = "编辑文书模板页面")
public ModelAndView edit(HttpServletResponse response, HttpServletRequest request) throws Exception {
String officePath = RequestUtil.getString(request, "officePath", "");
SysOffice sysOffice = new SysOffice();
if(!"".equals(officePath)){
File file = new File(officePath);
if(file != null){
String officeName = file.getName().substring(0, file.getName().lastIndexOf("."));
sysOffice.setOfficeName(officeName);
String officeExt = file.getName().substring(file.getName().lastIndexOf(".")+1, file.getName().length());
sysOffice.setOfficeExt(officeExt);
sysOffice.setOfficePath(officePath);
sysOffice.setHideOfficePath(sysOffice.getOfficePath().replace("\\", "//"));
}
}
ModelAndView mv = this.getAutoView();
return mv.addObject("sysOffice", sysOffice);
} /**
* 加载文书模板
* @param response
* @param request
* @return
* @throws Exception
*/
@RequestMapping("/editTemplate")
public ModelAndView editTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
String hideOfficePath = RequestUtil.getString(request, "hideOfficePath");
ModelAndView mv = this.getAutoView();
if(!"".equals(hideOfficePath)){
File file = new File(hideOfficePath.replace("//", "\\"));
if(file != null){
String officeName = file.getName().substring(0, file.getName().lastIndexOf("."));
String officeExt = file.getName().substring(file.getName().lastIndexOf(".")+1, file.getName().length());
mv.addObject("officeName", officeName);
mv.addObject("officeExt", officeExt);
}
}
mv.addObject("hideOfficePath", hideOfficePath);
return mv;
} /**
* 获取文书模板
* @param request
* @param response
* @throws Exception
*/
@RequestMapping("getTemplate")
@Action(description = "获取文书模板", detail = "获取文书模板")
public void getTemplate(HttpServletRequest request, HttpServletResponse response) throws Exception {
String hideOfficePath = RequestUtil.getString(request, "hideOfficePath");
hideOfficePath = java.net.URLDecoder.decode(hideOfficePath , "UTF-8");
hideOfficePath = hideOfficePath.replace("/", "\\");
byte[] readByte = FileUtil.readByte(hideOfficePath);
try {
response.getOutputStream().write(readByte);
} catch (IOException e) {
e.printStackTrace();
}
} @RequestMapping({ "saveOffice" })
@Action(description = "保存文书模板", execOrder = ActionExecOrder.AFTER)
public void saveFile(MultipartHttpServletRequest request, HttpServletResponse response) throws Exception {
String hideOfficePath = RequestUtil.getString(request, "hideOfficePath");
PrintWriter writer = response.getWriter();
try {
Map files = request.getFileMap();
Iterator it = files.values().iterator();
while (it.hasNext()) {
MultipartFile f = (MultipartFile) it.next();
File file = new File(hideOfficePath);
if (file.exists()) {
file.delete();
}
FileUtil.writeByte(hideOfficePath, f.getBytes());
writeResultMessage(writer, "保存文书模板成功!", ResultMessage.Success);
}
} catch (Exception e) {
writeResultMessage(writer, "保存文书模板失败!", ResultMessage.Fail);
}
} /**
* 删除系统文书模版
* @param request
* @param response
* @throws Exception
*/
@RequestMapping({ "del" })
@Action(description = "删除系统文书模版", execOrder = ActionExecOrder.BEFORE, detail = "删除系统文书模版:<#list StringUtils.split(id,\",\") as item><#assign entity=sysOfficeTemplateService.getById(Long.valueOf(item))/>【${entity.subject}】</#list>")
public void del(HttpServletRequest request, HttpServletResponse response) throws Exception {
String preUrl = RequestUtil.getPrePage(request);
ResultMessage message;
try {
String[] officePath = RequestUtil.getStringAryByStr(request, "officePath");
for (int i = 0; i < officePath.length; i++) {
File file = new File(officePath[i]);
if (file.isFile()) {
file.delete();
}
}
message = new ResultMessage(1, "删除文书成功!");
} catch (Exception ex) {
message = new ResultMessage(0, "删除文书失败:" + ex.getMessage());
}
addMessage(message, request);
response.sendRedirect(preUrl);
} /**
* 文件下载
*
* @Description:
* @param fileName
* @param request
* @param response
* @return
* @throws Exception
*/
@RequestMapping("/download")
public String downloadFile(HttpServletRequest request,
HttpServletResponse response) throws Exception {
String officeName = RequestUtil.getString(request, "officeName");
officeName = java.net.URLDecoder.decode(officeName , "UTF-8");
String officeExt = RequestUtil.getString(request, "officeExt");
String fullOfficeName = officeName + "." + officeExt;
fullOfficeName = fullOfficeName.replace(" ", "");
fullOfficeName = URLEncoder.encode(fullOfficeName,"UTF-8");
String hideOfficePath = RequestUtil.getString(request, "hideOfficePath");
String officePath = hideOfficePath.replace("//", "\\");
if (officePath != null && !"".equals(officePath)) {
File file = new File(officePath);
if (file.exists()) {
response.setContentType("application/force-download");// 设置强制下载不打开
response.setHeader("Content-disposition","attachment; filename="+fullOfficeName);
byte[] buffer = new byte[1024];
FileInputStream fis = null;
BufferedInputStream bis = null;
try {
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
OutputStream os = response.getOutputStream();
int i = bis.read(buffer);
while (i != -1) {
os.write(buffer, 0, i);
i = bis.read(buffer);
}
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
} finally {
if (bis != null) {
try {
bis.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if (fis != null) {
try {
fis.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
return null;
} /**
* 上传文书到指定目录
* @param request
* @param response
* @throws Exception
*/
@RequestMapping({ "upload" })
@ResponseBody
@Action(description = "上传文书到指定目录")
public Map upload(HttpServletRequest request, HttpServletResponse response) throws Exception {
Long[] sysOfficeIds = RequestUtil.getLongAryByStr(request, "sysOfficeIds");
Map map = new HashMap();
for (int m = 0; m < sysOfficeIds.length; m++) {
long fileId = sysOfficeIds[m];
if (fileId == 0L) {
map.put("result", "fileIdIsZero");
return map;
}
SysFile sysFile = this.sysFileService.getById(Long.valueOf(fileId));
if (sysFile == null) {
map.put("result", "fileNoExist");
return map;
}
String fileName = sysFile.getFileName() + "." + sysFile.getExt();
String fileServicePath = AppConfigUtil.get("file_server_addr");
String fullPath = "http://" + fileServicePath + File.separator + sysFile.getFilePath().replace("/", File.separator);
fullPath = fullPath.replace("\\", "/");
String uploadlujing = request.getSession().getServletContext().getRealPath("/")+"WEB-INF/fileTemplate/office";
saveUrlAs(fullPath, uploadlujing, fileName, "GET");
}
map.put("result", "fileUploadEnd");
return map;
} public static void findFileList(File dir, List<SysOffice> sysOfficeList, QueryFilter queryFilter) {
if (!dir.exists() || !dir.isDirectory()) {// 判断是否存在目录
return;
}
String[] files = dir.list();// 读取目录下的所有目录文件信息
for (int i = 0; i < files.length; i++) {// 循环,添加文件名或回调自身
File file = new File(dir, files[i]);
if (file.isFile()) {// 如果文件
SysOffice sysOffice = new SysOffice();
if(file.getName() != null){
String officeName = file.getName().substring(0, file.getName().lastIndexOf("."));
Object obj = queryFilter.getFilters().get("officeName");
if(obj != null){
String ofn = obj.toString();
if(!"".equals(ofn) && ofn != null){
if(!officeName.contains(ofn)){
continue;
}
}
}
sysOffice.setOfficeName(officeName);
String officeExt = file.getName().substring(file.getName().lastIndexOf(".")+1, file.getName().length());
sysOffice.setOfficeExt(officeExt);
}
sysOffice.setOfficePath(dir + "\\" + file.getName());
sysOffice.setHideOfficePath(sysOffice.getOfficePath().replace("\\", "//"));
sysOfficeList.add(sysOffice);// 添加文件全路径名
} else {// 如果是目录
findFileList(file, sysOfficeList, queryFilter);// 回调自身继续查询
}
}
} public static File saveUrlAs(String url, String filePath, String fileName, String method) {
// System.out.println("fileName---->"+filePath);
// 创建不同的文件夹目录
File file = new File(filePath);
// 判断文件夹是否存在
if (!file.exists()) {
// 如果文件夹不存在,则创建新的的文件夹
file.mkdirs();
}
FileOutputStream fileOut = null;
HttpURLConnection conn = null;
InputStream inputStream = null;
try {
// 建立链接
URL httpUrl = new URL(url);
conn = (HttpURLConnection) httpUrl.openConnection();
// 以Post方式提交表单,默认get方式
conn.setRequestMethod(method);
conn.setDoInput(true);
conn.setDoOutput(true);
// post方式不能使用缓存
conn.setUseCaches(false);
// 连接指定的资源
conn.connect();
// 获取网络输入流
inputStream = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(inputStream);
// 判断文件的保存路径后面是否以/结尾
if (!filePath.endsWith("/")) {
filePath += "/"; }
// 写入到文件(注意文件保存路径的后面一定要加上文件的名称)
fileOut = new FileOutputStream(filePath + fileName);
BufferedOutputStream bos = new BufferedOutputStream(fileOut);
byte[] buf = new byte[4096];
int length = bis.read(buf);
// 保存文件
while (length != -1) {
bos.write(buf, 0, length);
length = bis.read(buf);
}
bos.close();
bis.close();
conn.disconnect();
} catch (Exception e) {
e.printStackTrace();
System.out.println("抛出异常!!");
}
return file;
} }
Java逻辑分页代码的更多相关文章
- pagebean pagetag java 后台代码实现分页 demo 前台标签分页 后台java分页
java 后台代码实现分页 demo 实力 自己写的 标签分页 package com.cszoc.sockstore.util; import java.util.HashMap;import ja ...
- 经典KMP算法C++与Java实现代码
前言: KMP算法是一种字符串匹配算法,由Knuth,Morris和Pratt同时发现(简称KMP算法).KMP算法的关键是利用匹配失败后的信息,尽量减少模式串与主串的匹配次数以达到快速匹配的目的.比 ...
- 常用 Java 静态代码分析工具的分析与比较
常用 Java 静态代码分析工具的分析与比较 简介: 本文首先介绍了静态代码分析的基 本概念及主要技术,随后分别介绍了现有 4 种主流 Java 静态代码分析工具 (Checkstyle,FindBu ...
- 分享:根据webservice WSDL地址自动生成java调用代码及JAR包
分享:根据webservice WSDL地址自动生成java调用代码及JAR包使用步骤:一.安装java 并配置JAVA_HOME 及 path二.安装ANT 并配置ANT_HOME三.解压WsdlT ...
- FastDFS搭建及java整合代码【转】
FastDFS软件介绍 1.什么是FastDFS FastDFS是用C语言编写的一款开源的分布式文件系统.FastDFS为互联网量身定制,充分考虑了冗余备份.负载均衡.线性扩容等机制,并注重高可用.高 ...
- [原创]Java静态代码检查工具介绍
[原创]Java静态代码检查工具介绍 一 什么是静态代码检查? 静态代码分析是指无需运行被测代码,仅通过分析或检查源程序的语法.结构.过程.接口等来检查程序的正确性,找出代码隐藏的错误和缺陷,如参数 ...
- 最近开始研究PMD(一款采用BSD协议发布的Java程序代码检查工具)
PMD是一款采用BSD协议发布的Java程序代码检查工具.该工具可以做到检查Java代码中是否含有未使用的变量.是否含有空的抓取块.是否含有不必要的对象等.该软件功能强大,扫描效率高,是Java程序员 ...
- java集合框架之java HashMap代码解析
java集合框架之java HashMap代码解析 文章Java集合框架综述后,具体集合类的代码,首先以既熟悉又陌生的HashMap开始. 源自http://www.codeceo.com/arti ...
- 在Jmeter中使用自定义编写的Java测试代码
我们在做性能测试时,有时需要自己编写测试脚本,很多测试工具都支持自定义编写测试脚本,比如LoadRunner就有很多自定义脚本的协议,比如"C Vuser","Java ...
随机推荐
- SVN提交错误及使用技巧
错误1: Some of selected resources were not added to version control. Some of selected resources were n ...
- [ipsec][strongswan]strongswan源码分析--(零)引子
目录 strongswan sa 资料 编译 启动 进程信息 结构 架构图与插件 配置运行 传统配置方法 新的配置方法 其他配置方法 详细的配置文档 配置示例 用法 加密库 libgmp libcry ...
- github markdown语法及使用
历史 Markdown是一种轻量级标记语言,创始人为约翰·格鲁伯(英语:John Gruber).它允许人们"使用易读易写的纯文本格式编写文档,然后转换成有效的XHTML(或者HTML)文档 ...
- C++Primer第五版 练习8.6答案详解
重写7.1.1节书店程序(第299页),从文件中读取一个交易记录.将文件名作为一个参数传递给main. 本题所需源文件如下: Sales_data.h文件: #pragma once #include ...
- k8s证书之etcd,api,front-proxy配置文件
这几个文件,是要结合前面的master安装脚本的. 所以有的json文件中会出现一些LOCAL_HOSTS_L,THIS_HOST之类的变量. 如果手工单独使用这些文件,要将这些变量替换为合适的IP或 ...
- 后台将数据传回前台的三种绑定的方式(Model,Map.ModelAndView)
//方式1:通过model 将数据绑定 @RequestMapping(value = "findByIdModel", method = RequestMethod.GET) p ...
- JQuery实现品牌展示
最近验收了ITOO,老师当时验收的时候对于界面的设计非常敏感,只要看了一个大体轮廓,就能给出我们建议,这是二十年积累的经验,我们要做的就是站在巨人的肩膀上,让我们成长更快! 老师说了一下关于界面设计的 ...
- wordpress实现主动推送+熊掌号推送同步进行
今天给一个朋友http://www.myunigift.cn/ 这个站点是用wordpress,今天帮他改造熊掌号,于是做了数据同步推送. 只要把下面的代码写到funtions.php里面,发布文章的 ...
- css垂直居中的常用方法
CSS实现垂直居中的常用方法 2017-04-17 渔歌 前端开发 来自:渔歌 - 博客园 链接:www.cnblogs.com/yugege/p/5246652.html(点击尾部阅读原文前往) 已 ...
- 金蝶K3表
系统ID 表ID 表名 表中文名 表说明 FType FSefDefSign0 0 t_VoucherGroup 凭证字表 ...