The prefix "tx" for element "tx:advice" is not bound 这个错误的原因很简单是: 我们在定义申明AOP的时候..没有加载schema. <beans>中要加入“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址   配置文件如下: <?xml version="1.0" encoding="UTF-8&quo…
错误描述: ERROR [ContainerBackgroundProcessor[StandardEngine[Catalina]]] (ContextLoader.java:308) - Context initialization failedorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 46 in XML document from class path resource [appl…
Spring事务有两种方式: 1.编程式事务:(代码中嵌入) 2.声明式事务:(注解,XML) 注解方式配置事务的方式如下: 首先,需要在applicationContext.xml中添加启动配置,代码如下所示: <!-- 定义事务管理器 --> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <pr…
原文地址:http://www.infoq.com/articles/ddd-in-practice Background Domain Driven Design (DDD) is about mapping business domain concepts into software artifacts. Most of the writings and articles on this topic have been based on Eric Evans' book "Domain Dr…
http://www.concretepage.com/spring-4/spring-4-ehcache-configuration-example-with-cacheable-annotation   Spring 4 Ehcache Configuration Example with @Cacheable Annotation By Arvind Rai, March 16, 2015 In this page, we will learn Spring 4 Ehcache confi…
@Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @Documented public @interface Bean Indicates that a method produces a bean to be managed by the Spring container. Overview The names and semantics of the attributes to this annotation…
注解对代码的语意没有直接影响, 他们只负责提供信息给相关的程序使用. 注解永远不会改变被注解代码的含义, 但可以通过工具对被注解的代码进行特殊处理. JDK 基本Annotation 注解 说明 @Override 重写 @Deprecated 已过时 @SuppressWarnings(value = "unchecked") 压制编辑器警告 @SafeVarargs 修饰”堆污染”警告 @FunctionalInterface Java8特有的函数式接口 value特权如果使用注解…
1 Annotation 1.1 Annotation 概念及作用      1.  概念 An annotation is a form of metadata, that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated. Annotations have no direct effect on the operation of the…
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/…
 Java凝视Annotation 从JDK 5開始,Java添加了对元数据(MetaData)的支持,也就是Annotation(凝视).Annotation提供了一种为程序元素设置元数据的方法.程序元素包含修饰包.类.构造器.方法.成员变量.參数.局部变量.从某些方面来看,Annotation就想修饰符一样,可用于程序元素的声明.这些信息被存储在Annotation的"name = value"对中. 须要注意的是, Annotation是一个接口,程序能够通过反射来获取指定程…