`
jamesby
  • 浏览: 381065 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论
文章列表
Header.ftl文件代码 <#macro title color="red"> <font color="${color}" size="16px"><#nested></font> </#macro> <#assign version = "1.0"> <html> <head> <title>Hello World ${version}</title> </hea ...
sqlMap文件 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="Account"> <typeAlias ...
一、基本原理 Acegi认证授权主要基于两大技术,一是Filter机制,二是AOP的拦截机制。通过FilterSecurityInterceptor很好地实现了对URI的保护,通过MethodSecurityInterceptor实现了对Service的方法的拦截保护,通过ACL 实现了对prototype类型的Object进行过滤和保护。 二、基本概念 HttpSessionContextIntegrationFilter 存储SecurityContext in HttpSession ChannelProcessingFilter 重定向到另一种协议,如http到https Concu ...
一、PO的数据类型设置 int 还是Integer Integer 允许为 null Hibernate 既可以访问Field也可以访问Property,访问Property是只是调用getXXX()、setXXX()方法,因此在from Customer where c.name=’Tom’ HQL中,name属性不需要存在,只要getName()存在就可以了。 二、Hibernate映射 1、映射复合主键 主键类 Public class CustomerId implements Serializable{ Private final String name; Private ...

JSTL部分示例代码

    博客分类:
  • Java
<c:out value=”” default=”” escapeXml=”true”/> <c:out value=”${pageScope.username}”/> <c:out value=”${param.username}”/> <input type=”checkbox” name=”language” value=”english”> <input type=”checkbox” name=”language” value=”chinese”> <c:out value=”${paramValues ...
第一种情况,synchronized无效 package com.test; public class ThreadTest extends Thread { private int threadNo; public ThreadTest(int threadNo) { this.threadNo = threadNo; } public static void main(String[] args) throws Exception { for (int i = 1; i < 10; i++) { new Thread ...
written by robbin Hibernate配置文件可以有两种格式,一种是 hibernate.properties ,另一种是 hibernate.cfg.xml 后者稍微方便一些,当增加hbm映射文件的时候,可以直接在 hibernate.cfg.xml 里面增加,不必像 hibernate.properties 必须在初始化代码中加入。 但不管怎么说,两种的配置项都是一样的,下面详细介绍: 在Hibernate的src目录下有一个 hibernate.properties 模板,我们不必自己从头写,修改模板就可以了:) hibernate.query.substit ...
Before Advice package test3; public class MessageWriter { public void writeMessage() { System.out.print("World"); } } package test3; import java.lang.reflect.Method; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.framework.ProxyFactory; pu ...
http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html http://www.iteye.com/subject/Annotation
http://blog.csdn.net/explorers/archive/2005/08/15/454837.aspx http://www.onjava.com/pub/a/onjava/excerpt/javaian5_chap04/index.html
一、AOP 概念 Joinpoint:它定义在哪里加入你的逻辑功能,对于Spring AOP,Jointpoint指的就是Method。 Advice:特定的Jointpoint处运行的代码,对于Spring AOP 来讲,有Before advice、AfterreturningAdvice、ThrowAdvice、AroundAdvice(MethodInteceptor)等。 Pointcut:一组Joinpoint,就是说一个Advice可能在多个地方织入, Aspect:这个我一直迷惑,它实际是Advice和Pointcut的组合,但是Spring AOP 中的Advis ...
Spring AOP 部分Class的UML
以下内容是从书中摘录来的,但是我发现即使摘录一遍,对其内容的理解也会更加深入! 一、Spring装配Bean的过程 1. 实例化; 2. 设置属性值; 3. 如果实现了BeanNameAware接口,调用setBeanName设置Bean的ID或者Name; 4. 如果实现BeanFactoryAware接口,调用setBeanFactory 设置BeanFactory; 5. 如果实现ApplicationContextAware,调用setApplicationContext设置ApplicationContext 6. 调用BeanPostProcessor的预先初始化方法; 7. 调用 ...
package com.cm.main.dao.impl; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; import com.cm.main.dao.AbstractDao; import com.cm.main.dao.TestJdbcTemplateDao; ...
Controller protected BindException bindObject(HttpServletRequest request, Object command, Validator validator) throws Exception { ServletRequestDataBinder binder = createBinder(request, command); binder.bind(request); BindException errors = new BindException(command, getCommandName ...
Global site tag (gtag.js) - Google Analytics