2017年3月8日

Spring AOP 使用总结

摘要: spring AOP 使用总结 第一种形式:基于注解(推荐)@Aspect@Componentpublic class MyAdvice{ @Pointcut(value="execution(* xxx.xxx.*(..))") public void myPointcut(){} //@Befo 阅读全文

posted @ 2017-03-08 21:58 LZHL 阅读(160) 评论(0) 推荐(0) 编辑

spring事务配置总结

摘要: spring事务配置总结 第一种:使用注解(推荐) <!-- 第一步 配置事务管理器 --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> 阅读全文

posted @ 2017-03-08 17:33 LZHL 阅读(224) 评论(0) 推荐(0) 编辑

2017年3月1日

使用Redis存储Nginx+Tomcat负载均衡集群的Session

摘要: 使用Redis存储Nginx+Tomcat负载均衡集群的Session http://blog.csdn.net/xlgen157387/article/details/52024139 阅读全文

posted @ 2017-03-01 10:07 LZHL 阅读(121) 评论(0) 推荐(0) 编辑

2017年2月26日

CentOS-6.5安装JDK

摘要: CentOS-6.5安装JDK 1.用winSCP上传jdk-7u79-linux-i586.rpm到~/目录 2.安装 [root@centos ~]# rpm -ivh jdk-7u79-linux-i586.rpm 3.配置环境变量,在以下3个位置都可以 ~/.bashrc(推荐) ~/.ba 阅读全文

posted @ 2017-02-26 16:43 LZHL 阅读(139) 评论(0) 推荐(0) 编辑

2017年2月25日

centos防火墙基本操作

摘要: CentOS防火墙的基本操作 查看防火墙状态: [root@centos ~]# service iptables status 开放8080访问端口: [root@centos ~]# vi /etc/sysconfig/iptables 重启防火墙后查看 停止防火墙: [root@centos 阅读全文

posted @ 2017-02-25 17:40 LZHL 阅读(222) 评论(0) 推荐(0) 编辑

2017年2月23日

log4j.properties配置详解

摘要: log4j.properties配置详解 转自 http://blog.csdn.net/dr_guo/article/details/50718063 ######################################################################### 阅读全文

posted @ 2017-02-23 16:52 LZHL 阅读(3413) 评论(0) 推荐(1) 编辑

2017年2月20日

Hibernate session.get()和session.load()的区别

摘要: Hibernate session.get()和session.load()的区别 get()方法会立即发送sql语句查询数据库,返回实际查询结果 User user = session.get(id,User.class); load()方法不会立即发送sql语句查询数据库,返回的是代理,只有真正 阅读全文

posted @ 2017-02-20 12:05 LZHL 阅读(346) 评论(0) 推荐(0) 编辑

2017年2月19日

Java静态代理和动态代理总结

摘要: 静态代理 第一种实现(基于接口): 1》接口 2》目标类,至少实现一个接口 3》代理类(与目标类实现相同接口,从而保证功能一致) 3》测试 第二种实现(基于目标类): 1>目标类 2>代理类(通过继承目标类,保证功能一致) 3>测试 动态代理 动态代理的代理类是在程序运行期间动态生成的,也有两种实现 阅读全文

posted @ 2017-02-19 16:06 LZHL 阅读(605) 评论(0) 推荐(0) 编辑

2017年2月8日

java判断字符串String中是否存在中文

摘要: public class IsContainChinese { public static boolean isContainChinese (String str){ boolean flag=true; int count = 0; String regEx = "[\\u4e00-\\u9fa 阅读全文

posted @ 2017-02-08 18:53 LZHL 阅读(2683) 评论(0) 推荐(0) 编辑

2016年3月8日

eclipse设置统一编码

摘要: 1.Window-->Preferences-->General-->Workspace->Text file encoding->Other->UTF-8. 2.Window-->Preferences-->General->Content Type->Text->Default encoding 阅读全文

posted @ 2016-03-08 11:53 LZHL 阅读(363) 评论(0) 推荐(0) 编辑

导航