我真想和偷卖源码的人打一架
Posted 程序员springmeng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了我真想和偷卖源码的人打一架相关的知识,希望对你有一定的参考价值。
最近发现有人盗卖我开源的源码。我开源的源码仅限制学习使用,仅限制学习使用。
我本来是好心给大家开源学习用!没有收取任何的费用!
没想到啊!
竟然有人拿着我开源的代码去出售!
有人买了源码,不会调试,有问题还来找我???
我要吐血了!
这样好么?
希望大家别卖我开源的源码了!好好学习吧!
今天分享一个健康信息系统。源码开源了。
求求盗卖的人,赶紧走开吧!
1,系统的演示
2,系统的核心代码
public class BaseController
public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1天
/**
* 小孟开发,微交流:kaifazixun
*/
public String getHostUrl(HttpServletRequest request)
String hostName = request.getServerName();
Integer hostPort = request.getServerPort();
String path = request.getContextPath();
if (hostPort == 80)
return "http://" + hostName + path + "/";
else
return "http://" + hostName + ":" + hostPort + path + "/";
/***
* 获取当前的website路径 String
*/
public static String getWebSite(HttpServletRequest request)
String returnUrl = request.getScheme() + "://"
+ request.getServerName();
if (request.getServerPort() != 80)
returnUrl += ":" + request.getServerPort();
returnUrl += request.getContextPath();
return returnUrl;
/**
* 初始化HTTP头.
*
* @return HttpHeaders
*/
public HttpHeaders initHttpHeaders()
HttpHeaders headers = new HttpHeaders();
MediaType mediaType = new MediaType("text", "html",
Charset.forName("utf-8"));
headers.setContentType(mediaType);
return headers;
/**
* 返回 信息数据
*
* @param status
* @param msg
* @return
*/
public ResponseEntity<String> renderMsg(Boolean status, String msg)
if (StringUtils.isEmpty(msg))
msg = "";
String str = "\\"status\\":\\"" + status + "\\",\\"msg\\":\\"" + msg + "\\"";
ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,
initHttpHeaders(), HttpStatus.OK);
return responseEntity;
/**
* 返回obj数据
*
* @param status
* @param msg
* @param obj
* @return
*/
public ResponseEntity<String> renderData(Boolean status, String msg,
Object obj)
if (StringUtils.isEmpty(msg))
msg = "";
StringBuffer sb = new StringBuffer();
sb.append("");
sb.append("\\"status\\":\\"" + status + "\\",\\"msg\\":\\"" + msg + "\\",");
sb.append("\\"data\\":" + JacksonJsonUtil.toJson(obj) + "");
sb.append("");
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
sb.toString(), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
/***
* 获取IP(如果是多级代理,则得到的是一串IP值)
*/
public static String getIpAddr(HttpServletRequest request)
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
ip = request.getHeader("Proxy-Client-IP");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
ip = request.getHeader("WL-Proxy-Client-IP");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
ip = request.getRemoteAddr();
if (ip != null && ip.length() > 0)
String[] ips = ip.split(",");
for (int i = 0; i < ips.length; i++)
if (!"unknown".equalsIgnoreCase(ips[i]))
ip = ips[i];
break;
return ip;
public class MyController extends BaseController
/***
小孟开发,微交流:kaifazixun
*/
@Autowired
public DBHelper db;
public Map getAdmin(HttpServletRequest request)
Map customerBean = (Map)request.getSession().getAttribute("adminBean");
return customerBean;
public Map getPtadmin(HttpServletRequest request)
Map bean = (Map)request.getSession().getAttribute("ptadminBean");
return bean;
public Map getStudent(HttpServletRequest request)
Map bean = (Map)request.getSession().getAttribute("studentBean");
return bean;
public ResponseEntity<String> renderMsg(Boolean status, String msg)
if (StringUtils.isEmpty(msg))
msg = "";
StringBuffer sb = new StringBuffer();
sb.append("");
sb.append("\\"status\\":\\"" + status + "\\",\\"msg\\":\\"" + msg + "\\"");
sb.append("");
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
sb.toString(), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
public void writeToExcel(HSSFWorkbook wb, String fileName,HttpServletResponse response)
throws IOException
fileName = (fileName == null || fileName.equals("")) ? "result"
: fileName;
fileName = java.net.URLEncoder.encode(fileName, "UTF-8").replace('+',
' ');
response.reset();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename="
+ fileName + ".xls");
wb.write(response.getOutputStream());
response.getOutputStream().flush();
response.getOutputStream().close();
public ResponseEntity<String> renderData(Boolean status, String msg,
Object obj)
if (StringUtils.isEmpty(msg))
msg = "";
StringBuffer sb = new StringBuffer();
sb.append("");
sb.append("\\"status\\":\\"" + status + "\\",\\"msg\\":\\"" + msg + "\\",");
sb.append("\\"data\\":" + JacksonJsonUtil.toJson(obj) + "");
sb.append("");
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
sb.toString(), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
public ResponseEntity<String> renderDataEasyUi(HttpServletRequest request,Object obj)
StringBuffer sb = new StringBuffer();
PageTool page = (PageTool)request.getAttribute("page");
sb.append("");
sb.append("\\"total\\":\\"" + page.getSize() + "\\",");
sb.append("\\"rows\\":" + JacksonJsonUtil.toJson(obj) + "");
sb.append("");
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
sb.toString(), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
public ResponseEntity<String> renderComboBoxAjax(Object obj)
ResponseEntity<String> responseEntity = new ResponseEntity<String>(
JacksonJsonUtil.toJson(obj), initHttpHeaders(), HttpStatus.OK);
return responseEntity;
3,系统源码获取
还是那句话,仅限制学习使用!
若发现偷盗者,以后我开源的就少了!而且会追究你的责任!
最后希望大家给个三连吧!开源不容易!
如果也想学习本系统,已经开源了,下面领取。回复:健康
以上是关于我真想和偷卖源码的人打一架的主要内容,如果未能解决你的问题,请参考以下文章