- 博客(30)
- 资源 (5)
- 收藏
- 关注
原创 Java8新特性流式操作实例
在这边文章中我们将通过简单的例子展示JDK8的特性,流式操作,包括filter(),collector(),findAny()和orElse()1.Streams filter() and collect()1.1 在Java 8以前,我们是这么过滤一个List的:import java.util.ArrayList;import java.util.Arrays;import ja...
2020-04-07 16:55:13
754
原创 如何用JUnit4测试spring service
import static org.junit.Assert.*;import javax.annotation.Resource;import org.junit.Before;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.context.ApplicationContext;
2015-08-05 10:36:27
1206
原创 读Spring的源代码七:spring.handlers的加载过程
要实现自定义的xml配置,需要有两个默认spring配置文件来支持。一个是spring.schemas,一个是spring.handlers,前者是为了验证你自定义的xml配置文件是否符合你的格式要求,后者是告诉spring该如何来解析你自定义的配置文件。1.在步骤4createReaderContext的时候,会做如下检查,如果没有resolver会创建一个默认的DefaultNamespaceH
2015-08-03 16:50:47
4843
原创 读Spring的源代码六:Controller mapping的注册过程
DispatchServlet每次收到请求后,都会去一个LinkedHashMap(handlerMethods)里面找对应的handler。这个map的初始化过程在下图你可以找到。 这个map是放在AbstractHandlerMethodMapping中的。
2015-07-28 11:26:46
912
原创 读Spring的源代码三:ContextLoaderListener和DispatcherServlet的加载过程
1.这是ContextLoaderListener的加载过程,看下图它会创建一个root的application context。 2.这是DispatcherServlet的加载过程,它会创建一个web application context。这个context的父context就是上面ContextLoaderListener创建的root的application context. 为什
2015-07-27 15:38:29
1027
原创 读Spring的源代码二:DispatcherServlet处理web请求的过程
DispatcherServlet是web服务的入口,是spring mvc重要的一环。下面是一个http request触发的调用过程。
2015-07-27 12:43:30
744
原创 读Spring的源代码一:Spring bean的注册过程
之前一直想读一下spring源码,终于闲下来了,有时间好好看看。现在把自己看到的调用过程画成时序图,以备以后查看。
2015-07-22 14:06:09
868
原创 Ubuntu常用命令
1. 重设Ubuntu 的root用户密码sudo passwd root2.* 重设Ubuntu 的root用户密码sudo passwd root
2014-11-13 23:47:15
525
原创 在Ubuntu上安装Sqlmap
1.下载swget 'https://github.com/sqlmapproject/sqlmap/tarball/master' --output-document=sqlmapproject-sqlmap.tar.gztar -xvf sqlmapproject-sqlmap-0.9-3671-gdcaad75.tar.gzcd sqlmapproject-sql
2014-11-13 23:39:35
4023
原创 如何远程连接IBM Integration Node
1.运行runmqsc管理QMGRsu - mqmcd /opt/mqm/bin./runmqsc2.修改默认MQ Listener的控制类型和IPalter listener(SYSTEM.DEFAULT.LISTENER.TCP) trptype(TCP) port(1414) control(QMGR)3.启动MQ Listenerstart li
2014-11-03 16:14:08
952
原创 在Linux上安装IBM Integration Bus V9 (MB)
一.前提条件安装MB前必须保证以下软件已经在系统上正确安装。不然MB安装后无法正确创建Broker。1. MQ V72. 保证/opt目录下有至少1000M可用空间二.
2014-11-03 15:24:19
2191
转载 Creating a broker on Linux and UNIX systems
Creating a broker on Linux and UNIX systemsOn Linux and UNIX systems, create brokers on the command line; on Linux on x86, you can also create brokers in the IBM® Integration Toolkit.Before yo
2014-10-31 17:53:25
778
转载 反射实现 AOP 动态代理模式(Spring AOP 的实现 原理)
好长时间没有用过Spring了. 突然拿起书.我都发现自己对AOP都不熟悉了.其实AOP的意思就是面向切面编程.OO注重的是我们解决问题的方法(封装成Method),而AOP注重的是许多解决解决问题的方法中的共同点,是对OO思想的一种补充!还是拿人家经常举的一个例子讲解一下吧:比如说,我们现在要开发的一个应用里面有很多的业务方法,但是,我们现在要对这个方法的执行做全面监控,或部分监
2014-03-17 00:46:01
570
转载 Inversion of Control Containers and the Dependency Injection pattern
Inversion of Control Containers and the Dependency Injection patternIn the Java community there's been a rush of lightweight containers that help to assemble components from different projects int
2014-03-16 16:23:28
1195
转载 How to Install Oracle Java JDK on Ubuntu Linux
How to Install Oracle Java JDK on Ubuntu LinuxEdited by Entricular, Maluniu, Snow Wolf, Nubiognu and 8 othersThis tutorial will cover the installation of 32-bit and 64-bit Oracle Java 7 (currently
2014-01-27 22:05:14
951
原创 在Ubuntu下搭建eclipse开发环境
第一步:下载jdk-7-linux-i586.tar.gzwget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz 第二步:解压安装sudo tar zxvf ./jdk-7-linux-i586.tar.gz -C /usr/lib/jvmcd /usr/lib/jvmsud
2013-08-30 10:38:28
576
原创 EJB3事务的使用
事务策略: 了解事务陷阱http://www.ibm.com/developerworks/cn/java/j-ts1.html
2013-07-29 22:49:56
513
原创 在EJB3中编写拦截器以及如何配置默认拦截器
1.编写拦截器,主要是把进入的类和方法写入日志中import javax.interceptor.AroundInvoke;import javax.interceptor.InvocationContext;import org.slf4j.Logger;import org.slf4j.LoggerFactory;public class HpTracingIntercept
2013-07-23 14:29:40
983
原创 如何创建activemq的MDB
1.在jboss的standalone.xml中加入activemq的资源适配器 activemq-rar-5.7.0.rar LocalTrans
2013-07-23 14:20:02
1015
原创 在Solaris SPARC上安装JDK和JBoss
1. CheckOS digitsisainfo-vk 2. Install JDK7gzip -dcjdk-7u-solaris-sparc.tar.gz | tar xf -gzip -dcjdk-7u-solaris-sparcv9.tar.gz | tar xf – 3. Install JBOSS7gtar -xf jboss
2013-07-15 10:53:15
724
原创 JPA 检索语句
根据时间段检索SELECT e FROM Events e WHERE e.eventsDate BETWEEN :startDate AND :endDate
2013-07-12 16:11:02
527
原创 EJB3创建Timer
最近因为工作需要,要和其他的接口通过数据库来做mapping.通过一个timer不断的去轮询这些表.1.轮询timer的配置,默认设为1分钟一次. True * * 0 * * Asia/Singapore * *如果通配符是"*"表示所有时间都可匹配.如果时间是0表示该时间必须是0.比如上面配置把second设为0,其他都为*,表示是其他时间都可以任意匹配
2013-07-11 18:09:01
1165
原创 如何通过junit测试EJB(Jboss容器)
环境:maven配置文件 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.ufis_as EK-PTS-TEST 0.0.1-SNAPSHOT
2013-07-11 13:01:06
2214
Java编程那些事儿.chm
2010-11-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人