hackpro的博客
hackpro · 共 97 篇文章
mysq 更新自己表 子查询,排序自动加1
update trade_goods_category a , ( select goods_cate_id,@rownum:= @rownum+1 as rownum from trade_goods_category,(select @rownum:=0) t where parent_id in (select goods_cate_id from trade_goods_category where grade=1 and goods_cate_name ='铜') order by parent_id,goods_cate_name ) b set a.orders= b.rown…
2017-11-06 15:20 · 评论(0)
这可能是北半球最全的Spring Cloud实战案例了
这可能是北半球最全的Spring Cloud实战案例了 @全体成员 https://github.com/zpng/spring-cloud-microservice-examples https://github.com/prontera/spring-cloud-rest-tcc https://github.com/yidongnan/spring-cloud-consul-example https://github.com/yidongnan/spring-cloud-netflix-example https://github.com/xetys/spring-cloud-oau…
2017-04-19 15:12 · 评论(0)
npm 安装py环境
npm 安装py环境 $ npm install --global --production windows-build-tools $ npm install --global node-gyp From http://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm 不用手动吧 npm install node-sass —sass_binary_site=http://cdn.npm.taobao.org/dist/node-sass yarn add node-sass —sass_binary…
2017-03-10 16:13 · 评论(0)
关于微信分享的坑
1.官方的api http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E8.8E.B7.E5.8F.96.E2.80.9C.E5.88.86.E4.BA.AB.E7.BB.99.E6.9C.8B.E5.8F.8B.E2.80.9D.E6.8C.89.E9.92.AE.E7.82.B9.E5.87.BB.E7.8A.B6.E6.80.81.E5.8F.8A.E8.87.AA.E5.AE.9A.E4.B9.89.E5.88.86.E4.BA.AB.E5.86.85.E5.AE.B9.E6.8E.A5.E5.8…
2016-07-13 14:09 · 评论(0)
apache,spring工具包
Apache Commons组件有关日期的处理主要有五个类, DateFormatUtils DateUtils DurationFormatUtils FastDateFormat StopWatch sprign 属性拷贝 ,null的也被复制了,需要重写一下 org.springframework.beans.BeanUtils public class SpringBeanUtils extends BeanUtils { public static void copyProperties(Object source, Object target) throws BeansExcep…
2016-01-08 14:54 · 评论(0)
sprign 数据绑定
UserRettievePwdReq bean = new UserRettievePwdReq(); ServletRequestDataBinder binder = new ServletRequestDataBinder(bean); binder.bind(request);
2015-11-04 17:16 · spring · 评论(0)
JS版StringFormat函数
JS版StringFormat函数 String.prototype.StringFormat = function() { if (arguments.length == 0) { return this; } for (var StringFormat_s = this, StringFormat_i = 0; StringFormat_i < arguments.length; StringFormat_i++) { StringFormat_s = StringFormat_s.replace(new RegExp("\{" + StringFormat_i + "\}", "g")…
2015-02-03 15:06 · js · 评论(0)
Mybatis 的Log4j日志输出问题 - 以及有关日志的所有问题
Mybatis内置的日志工厂提供日志功能,具体的日志实现有以下几种方式: SLF4J Apache Commons Logging Log4j 2 Log4j JDK logging 具体选择哪个日志实现由MyBatis的内置日志工厂确定。它会使用最先找到的(按上文列举的顺序查找)。 如果一个都未找到,日志功能就会被禁用。 不少应用服务器的classpath中已经包含Commons Logging,如Tomcat和WebShpere, 所以MyBatis会把它作为具体的日志实现。 记住这点非常重要。这意味着,在诸如 WebSphere的环境中——WebSphere提供了Commons Log…
2014-09-23 17:52 · @param mybatis 分页 多参 · 评论(0)
Referenced file contains errors (http://JAVA.sun.com/xml/ns/j2ee/web-app_2_5.xsd
Referenced file contains errors (http://JAVA.sun.com/xml/ns/j2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..." <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" xmlns="http://JAVA.sun.com/xml/ns/j2ee" …
2014-06-20 09:19 · xml Dtd异常 解决办法 · 评论(0)
oracle 高效插入大量数据
在很多时候,我们会需要对一个表进行插入大量的数据,并且希望在尽可能短的时间内完成该工作,这里,和大家分享下我平时在做大量数据insert的一些经验。 前提:在做insert数据之前,如果是非生产环境,请将表的索引和约束去掉,待insert完成后再建索引和约束。 insert into tab1 select * from tab2; commit; 这是最基础的insert语句,我们把tab2表中的数据insert到tab1表中。根据经验,千万级的数据可在1小时内完成。但是该方法产生的arch会非常快,需要关注归档的产生量,及时启动备份软件,避免arch目录撑爆。 alter table t…
2014-04-24 10:20 · oracle · 评论(0)
jdk1.6下载地址
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
2013-10-27 10:24 · jdk1.6下载地址 · 评论(0)
java.lang.IllegalStateException: No recoveryService set yet! 错误解决
oracle分布式事务开启配置 由于要将超级用户下的表授权给普通用户使用,用户很谨慎的考虑到可能会对同一个数据库的其他用户和业务产生影响 grant select on sys.dba_pending_transactions to mtsbwtst; grant select on sys.pending_trans$ to mtsbwtst; grant select on sys.dba_2pc_pending to mtsbwtst; grant execute on sys.dbms_system to mtsbwtst; grant select on sys.dba_pendi…
关于mybatis 级连查询 多查询条件方法
2013-08-16 20:34 · mybatis · 评论(0)
spring 3.2 与mybatis 整合数据源出错的问题
配置文件如下: <context:property-placeholder location="classpath*:conf/jdbc.properties" /> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="${dba.jdbc.driverClassName}" /> <property name="url" value="${dba.jdbc.url}" /> <pro…
2013-07-26 18:07 · spring · 评论(0)
通过注解多参数方式解决mybatis物理分面
所有的mapper 都是通过mybatis-generator-core-1.3.1.jar(之前的博文中有介绍) 生成了.. 唯独没有提供分页方法.. 2 百度很时间终打到满意答案. 废话不多说,直接上代码 1 mapper 基类 public interface BaseMapper<T, E, K> { int countByExample(E e); int deleteByExample(E e); int deleteByPrimaryKey(K k); int insert(T t); int insertSelective(T t); List<T> selectByExam…
2013-07-25 19:33 · java asc · 评论(0)