工作中的一点小总结

Spring cloud入门讲解很好的blog:

 http://blog.csdn.net/forezp/article/details/69696915

Eclipse Git 冲突

https://www.cnblogs.com/ouhaitao/p/7866209.html

如果是.classpath冲突,对该文件  replace with – Head Revision

oracle查询锁包

SELECT 'alter system kill session ' || '''' || sid || ',' || serial# || '''immediate;', a.*  
  FROM dba_ddl_locks a, v$session ss  
 WHERE a.name = upper('pkg_crm_report_bo')  

   AND a.session_id = ss.sid;  

Jedis链接池配置

http://hstrust.iteye.com/blog/2315619
https://www.cnblogs.com/tankaixiong/p/4048167.html
参考jdbc连接池
jdbc.maxActive=100
jdbc.initialSize=10
jdbc.maxWait=10000
jdbc.maxIdle=20
jdbc.minIdle=10
jdbc.timeBetweenEvictionRunsMillis=3000
jdbc.minEvictableIdleTimeMillis=30000
jdbc.validationQuery=select 1 from dual
jdbc.testWhileIdle=true
jdbc.testOnBorrow=true

jdbc.testOnReturn=false

Layer

top.layer.msg("请选择开始日期!",{icon:7,time:1500}):
1-√;2-×;3-?;4-锁;5-不开心;6-开心;7-三角;
layer.msg("Sorry,异常来袭,请稍候再试",{icon:5});


//loading层
var xxx = layer.load(0, {time: 12*1000});
if(typeof(xxx) == "number"){
layer.close(xxx);
}
//询问框
layer.confirm('您是如何看待前端开发?', {
  btn: ['重要','奇葩'] //按钮
}, function(){
  layer.msg('的确很重要', {icon: 1});
}, function(){
  layer.msg('也可以这样', {
    time: 20000, //20s后自动关闭
    btn: ['明白了', '知道了']
  });

});

Corn表达式

Seconds:可出现", - * /"四个字符,有效范围为0-59的整数 
Minutes:可出现", - * /"四个字符,有效范围为0-59的整数 
Hours:可出现", - * /"四个字符,有效范围为0-23的整数 
DayofMonth:可出现", - * / ? L W C"八个字符,有效范围为0-31的整数 
Month:可出现", - * /"四个字符,有效范围为1-12的整数或JAN-DEc 
DayofWeek:可出现", - * / ? L C #"四个字符,有效范围为1-7的整数或SUN-SAT两个范围。1表示星期天,2表示星期一, 依次类推 
Year:可出现", - * /"四个字符,有效范围为1970-2099年

每一个域都使用数字,但还可以出现如下特殊字符,它们的含义是: 
(1)*:表示匹配该域的任意值,假如在Minutes域使用*, 即表示每分钟都会触发事件。
(2)?:只能用在DayofMonth和DayofWeek两个域。它也匹配域的任意值,但实际不会。因为DayofMonth和DayofWeek会相互影响。例如想在每月的20日触发调度,不管20日到底是星期几,则只能使用如下写法: 13 13 15 20 * ?, 其中最后一位只能用?,而不能使用*,如果使用*表示不管星期几都会触发,实际上并不是这样。 
(3)-:表示范围,例如在Minutes域使用5-20,表示从5分到20分钟每分钟触发一次 
(4)/:表示起始时间开始触发,然后每隔固定时间触发一次,例如在Minutes域使用5/20,则意味着5分钟触发一次,而25,45等分别触发一次. 
(5),:表示列出枚举值值。例如:在Minutes域使用5,20,则意味着在5和20分每分钟触发一次。 
(6)L:表示最后,只能出现在DayofWeek和DayofMonth域,如果在DayofWeek域使用5L,意味着在最后的一个星期四触发。 
(7)W:表示有效工作日(周一到周五),只能出现在DayofMonth域,系统将在离指定日期的最近的有效工作日触发事件。例如:在 DayofMonth使用5W,如果5日是星期六,则将在最近的工作日:星期五,即4日触发。如果5日是星期天,则在6日(周一)触发;如果5日在星期一到星期五中的一天,则就在5日触发。另外一点,W的最近寻找不会跨过月份 
(8)LW:这两个字符可以连用,表示在某个月最后一个工作日,即最后一个星期五。 
(9)#:用于确定每个月第几个星期几,只能出现在DayofMonth域。例如在4#2,表示某月的第二个星期三。

举几个例子: 
0 0 2 1 * ? * 表示在每月的1日的凌晨2点调度任务 
0 15 10 ? * MON-FRI 表示周一到周五每天上午10:15执行作业 
0 15 10 ? 6L 2002-2006 表示2002-2006年的每个月的最后一个星期五上午10:15执行作

一个cron表达式有至少6个(也可能7个)有空格分隔的时间元素。

Solr

DEMO:
1st:初体验
http://blog.csdn.net/u012385190/article/details/51682380
2snd:在Java中的简单使用
http://blog.csdn.net/u012385190/article/details/53115546
3tird:Filed注解

http://blog.csdn.net/qq_20641565/article/details/55259690

未来元素绑定js

//放在$(function(){})里才有效 
$(document).on("click", "#testDiv", function(){ 
//此处的$(this)指$( "#testDiv"),而非$(document) 

});

表格超长…隐藏

style=\"table-layout:fixed\"

<td title='xxx ' style=\"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;\">xxx</td>

title:作用是鼠标指上去时候有个提示,可以用其他技术代替(比如layer.tip)。

                //layer  tips层-下
layer.tips('我是自定义的提示语', '#urBindingId', {
 tips: [3, '#E64A19'], tipsMore: true

});

Junit测试相关

import org.junit.runner.RunWith;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)//此处调用Spring单元测试类

@ContextConfiguration(locations = {"classpath:spring/spring-application.xml"})//加载spring容器

对应的文件位置:\src\main\resources\spring\spring-application.xml

@Autowired
private IProcessCenterService processCenterService;

@Test
public void delegations(){
List<String> delegationAccount = processCenterService.findDelegationByShareto("zhongjj");
System.out.println(delegationAccount);

}

Linux命令

查看日志 tail -200f catalina.out(进入tomcat的log文件夹后)
History 查看历史操作
ps –ef|grep redis/tomcat
给yzadmin 账户赋予某个文件夹使用权限
chown -R yzadmin:yzgrp /usr/local/redis-4.0.6
命令里面是-R  yzadmin是账户  yzgrp是其对应的组  在root下面给其赋权限


查看用户所属组有很多方法:
1. 命令groups 查看当前用户所属组
2. groups 用户(查看用户所属组)
3. id 用户(查看用户所属组)
4. 直接查看组文件,more /etc/group 组用户


netstat -tunlp|grep 8088 或者 lsof -i :8088  :查看8088端口是否被占用
find / -name fantasy*   :查找所有fantasy开头的文件

Eclipse

把项目中的js认证去掉(不然复制粘贴的时候特别卡)(项目目录下的.project)

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>cds</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<!-- <buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand> -->
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<!-- <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand> -->
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<!-- <nature>org.eclipse.wst.jsdt.core.jsNature</nature> -->
</natures>

</projectDescription>

Mybatis写SQL注意

<1>  其实>没关系,都转换成大于的逻辑也可以
<![CDATA[>=]]> date '${startDate}'
<![CDATA[ <= ]]> date '${endDate}'
或者XML的转义字符:
&lt;    <

&gt; >  


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值