`
xiaoye4188
  • 浏览: 30589 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
首先看一下别人的三种Button设置的监听方式 我们再给出通过XML配置文件的监听设置方法 在Activity类中定义方法 public void buttonMethod(View button){ do what you want... } 在xml文件中 <Button android:id="@+id/myButtonId" android:layout_width="fill_parent" android:layout_height="wrap_content" a ...
Quartz是一个非常优秀的任务调度引擎,详情请见官网:[url]http://www.quartz-scheduler.org/[/url] 而Spring很好地集成了Quartz,为企业级的任务调度提供了方便。   下面先看一个实现了Job接口的任务HelloWorldJob: package com.springQuartz.example; import java.util.Map; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutio ...
我们先来看一个问题:一个User用户对应多张信用卡Card 类User: package com.demo.beans; import java.util.List; public class User { private int id; private String name; private List<Card> cards; set get省略... }  类Card: package com.demo.beans; public class Card { private int id; private ...
首先,面试的时候经常会被问到JSP和Servlet有什么关系? 从表面上看,JSP处理页面展示,Servlet处理页面跳转;更进一步就是有些面试宝典上说得:JSP编译后是类Servlet文件   那么到底两者是什么关系?见下面分析   一个简单的JSP文件HelloWorld.jsp   <%@ page buffer="16kb" %> <%! int a = 0; %> <% String message = "Hello World!"; out.print(a); %> <%= ...
本模拟实现的功能:将如下xml文件中的bean加载进spring容器,同时将studentDao注入studentService中,最后通过getBean()获取bean <?xml version="1.0" encoding="UTF-8"?> <beans> <bean id="studentDao" class="com.zju.test. ...

Drools记录执行的规则

 
通过debug跟踪Drools的执行源码,实现执行规则的记录(输出)功能。   在ksession.fireAllRules();  进入类StatefulKnowledgeSessionImpl.fireAllRules()中   类StatefulKnowledgeSessionImpl主要涉及的成员变量及方法:   public ReteooWorkingMemory session; public int fireAllRules() { return this.session.fireAllRules(); }    其中ReteooWor ...
Spring最主要的就是IOC和AOP概念。 一、IOC就是依赖注入或者叫做控制反转。 原本new出来的依赖类对象现在由spring容器来进行注入管理。 个人认为优点有:降低耦合性,实现容器对依赖类的统一管理。 BeanFactory和ApplicationContext的关系: 1)前者是基本的spring容器接口,提供了容器的基本功能,它的职责包括:实例化、定位、配置应用程序中的对象及建立这些对象间的依赖;后者是前者的功能扩展 2)网上说如果配置文件applicationContext.xml出现错误,如果用BeanFactory,则在第一次getBean的时候会报错;如果用applica ...
Global site tag (gtag.js) - Google Analytics