02 2015 档案
摘要:Catalina的start方法 /** * Start a new server instance. */ public void start() { if (server == null) { load(); } ...
阅读全文
摘要:在Catalina的load方法中,首先初始化Server组件。 // Start the new server if (server instanceof Lifecycle) { try { server.initialize(...
阅读全文
摘要:tomcat的启动从Bootstrap类的main方法开始。 public static void main(String args[]) { //单例 if (daemon == null) { daemon = new Bootstrap();/...
阅读全文
摘要:用的是最新的jedis-2.6.2.jar这个包,这个和以前的有点不同。还需要添加spring-data-redis-1.2.1.RELEASE.jar和commons-pool2-2.3.jar。在类路径下创建spring-redis-config.xml文件 ...
阅读全文
摘要:直接来看看redis怎么安装到windows系统上,并开启他的服务。可以在这里下载https://github.com/dmajkic/redis/downloads。我用的是64位的,解压后的结构是这样的,有两个文件是没有的,我在后面添加的,install_service.bat和RedisSer...
阅读全文
摘要:方法区和堆区是数据共享区。栈区:数据不共享。方法参数、局部变量、参与运算的中间结果、返回值等等都在栈区中。堆区:数据共享。存放对象。方法区存放类型信息,类型信息包括:字段信息、方法信息、该类型的常量池、类变量、一个到类ClassLoader的引用,一个到Class类的引用。这部分数据是共享的,是一个...
阅读全文
摘要:Java虚拟机的内存分区:Java栈、堆、方法区、本地方法栈、PC寄存器。还有一个常量池的概念,虚拟机会为每种类型分配一个常量池,而不是实例。例如有一个类有很多子类,那么在父类定义的final变量,在子类是不能被改变的。可以说明是在类型上分配的。被static修饰的变量或者方法是属于类本身,而不属于...
阅读全文
摘要:// 发送邮件 public static void send(String toEmail, String content) { Session session = getSession(); try { System.out.pri...
阅读全文
摘要:下载cxf包,把他里面的包都添加进lib文件夹中。创建一个接口。添加@WebService注解@WebServicepublic interface HelloWorld { String sayHi(@WebParam(name="text")String text); String ...
阅读全文
摘要:spring继承Mongo使用的是spring-data.如果需要加入两个mongo与spring集成的包,spring-data-commons-1.7.0.RELEASE.jar,spring-data-mongodb-1.4.0.RELEASE.jar。mongo的配置 ...
阅读全文
摘要:首先下载mongdb的zip包,可以到:http://www.mongodb.org/downloads。选择32位或64位的。在D盘创建mongodb文件夹,d:\mongodb。把解压里面所有的东西都拷贝到该文件夹下。并在这个文件夹下创建data文件夹。d:\mongodb\data。在data...
阅读全文