自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 资源 (1)
  • 收藏
  • 关注

原创 jsonp跨域

1.前端:function callback(data){ console.log(data);}$.ajax({    url: url,    type: 'get',    dataType: 'jsonp',    jsonp:"callback",    jsonpCallback:"callback",    success: function(data){ ...

2018-11-09 16:50:40 149

原创 区分JS中的undefined,null,"",0和false

<script>alert(0 == ''); //truealert(0 == false); //truealert(false == ''); //truealert(null == undefined); //truealert(!0); //truealert(!false); //truealert(!undefined); //truealert(!...

2018-11-09 16:45:44 386

原创 输出字节流中的压缩文件

输出zip文件用字节流  :(字节流直接操作文件,字符流有缓存) private void download(InputStream inputData,String fileName,String fileExtension) throws IOException{           HttpServletResponse response = ServletActionContex...

2018-10-19 10:58:42 753

原创 百度云网盘下载大文件绕过下载网盘客户端

在下载的页面控制台输入:$.ajax({    type: "POST",    url: "/api/sharedownload?sign=" + yunData.SIGN + "&timestamp=" + yunData.TIMESTAMP,    data: "encrypt=0&product=share&uk=" + yunData.SHARE_...

2018-08-31 14:33:29 2730 1

原创 ZipInputStream 解压zip java.lang.IllegalArgumentException: MALFORMED 错误

1.压缩解压ZIP文件对文件名都是以UTF-8编码方式来处理的,而WinZip对文件名只会    以ASCII编码方式来处理原代码:ZipInputStream zis = new ZipInputStream(in);jdk1.7:ZipInputStream(InputStream in, Charset) 增加GBK编码:ZipInputStream zis = new Zi...

2018-08-30 15:40:51 3873

原创 strust2接受ajax前台传json对象

1.在Struts2的Action中提取Content-Type为application/x-www-form-urlencoded的POST参数,但是对Content-Type为application/json的请求数据,Struts2默认无法解析。因为请求的JSON数据需从输入流中读取出来,无法直接从ServletRequest的请求参数中解析。2.利用struts2的模型驱动,ajax传...

2018-08-28 17:27:25 439

原创 sql优化:with as 作 union all的子查询 来避免多次扫描表

语法:1.结构: with 别名 as ( 公共sql片段 )2.CTE(公共表达式)后面必须直接紧跟使用CTE的SQL语句,否则失效;如:1) with cr as (select CountryRegionCode from person.CountryRegion where Name like 'C%' )   select * from person.StatePro...

2018-08-22 16:06:19 13463 1

原创 JBOSS集群配置参数

JBOSS集群配置:http://www.voidcn.com/article/p-pmwuybxr-wk.html场景1:各节点在不同机器上这是最常见的使用场景。假设两台机器分别叫做”node1”与”node2”,node1的地址是192.168.0.101,node2的地址是192.168.0.102,他们的”ServerPeerID”分别是1和2。假设这两个机器得Jboss都装在/var/j...

2018-07-09 14:53:19 792

原创 spring 事务嵌套总结:

spring 事务嵌套:外层事务TraB,内层事务TraA、TraC场景1:TraA、TraC @Transactional(默认REQUIRED) TraB:  traA.update(order1); (traA.update throw new RuntimeException();)   traC.update(order2); 结果:内外层事务全部回滚;场景2:TraA、TraC @...

2018-05-22 17:51:09 3315 2

原创 cxf 3.2+webservice+spring 4.2发布Rest WebService

1.接口interface:@WebService(serviceName="ShowCaseService", endpointInterface = "com.xxx.demo.service.ShowCaseService")@Path("/showCases")@Api(value = "/showCases")public interface ShowCaseService...

2018-03-19 10:32:59 345

原创 事务的嵌套

SPRING事务的嵌套使用嵌套事务的场景有两点需求:需要事务BC与事务AD一起commit,即:作为事务AD的子事务,事务BC只有在事务AD成功commit时(阶段3成功)才commit。这个需求简单称之为“联合成功”。这一点PROPAGATION_REQUIRED可以做到。需要事务BC的rollback不(无条件的)影响事务AD的commit。这个需求简单称之为“隔离失败”。这一点PROPAGA...

2018-03-13 15:02:12 1459

原创 关于BeanUtils.copyProperties() 用法及区别

关于BeanUtils.copyProperties() 用法及区别这两个类在不同的包下面,而这两个类的copyProperties()方法里面传递的参数赋值是相反的。org.apache.commons.beanutils.BeanUtils#copyProperties方法会进行类型转换,默认情况下会将Ineger、Boolean、Long等基本类型包装类为null时的值复制后转换成0或者fa...

2018-03-10 17:28:25 1924 1

原创 java8常用新特性

1.Lambda表达式2.Stream API3.Optional

2018-03-10 16:39:27 477

原创 spring 注解实现事件监听

1.public class OrderEvent { private String price; public String getPrice() { return price; } public void setPrice(String price) { this.price = price; }}2.    @Componentpublic class OrderListener { ...

2018-03-10 14:00:37 1053

原创 datatable报错1:Requested unknown parameter 'XXX' for row 1

{ "data": "salt","sortable": false,className: 'align-left',                 "render":function ( data, type, row ){                 console.log(row);             if(row.org != null){       

2018-02-02 17:42:27 1043

原创 Spring mvc 定时任务配置

1.xmlns:task="http://www.springframework.org/schema/task"2. http://www.springframework.org/schema/task  http://www.springframework.org/schema/task/spring-task.xsd3.default-lazy-init="false"4.

2017-12-28 09:56:58 221

原创 spring boot + mybatis + jsp整合

 spring boot + mybatis + jsp整合-----------------------------1.pom.xml:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.or...

2017-11-30 10:00:38 1247

原创 spring boot测试类包名与main下application.class启动类的包名默认要一致

spring boot

2017-11-29 15:22:51 4638 2

转载 部署Maven项目到tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi

搭建SSM时报:Error configuring application listener of class org.springframework.web.context.ContextLoaderListener;问题背景:工程为maven工程,ContextLoaderListener类位于spring-web-3.1.0.RELEASE.jar包中。检查了

2017-07-14 17:48:26 310

原创 MD5加密、DES加解密、RSA加解密

1.MD5加密:java.security.MessageDigestjdk1.6描述:此 MessageDigest 类为应用程序提供信息摘要算法的功能,如 MD5 或 SHA 算法。信息摘要是安全的单向哈希函数,它接收任意大小的数据,并输出固定长度的哈希值。MessageDigest 对象开始被初始化。该对象通过使用 update 方法处理数据。任何时候都可以调用r

2017-05-19 15:30:40 319

转载 eclispe下建立webServiceDemo

http://www.iteye.com/topic/1135747

2017-02-16 18:07:20 218

mybatis-mysql-generator

mybatis-mysql-generator.zip

2018-11-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除