![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
_love
这个作者很懒,什么都没留下…
展开
-
Spring 依赖注入 简单实例Demo
package com.knight.service; public interface Knight { public void doAction(); } package com.knight.service.impl; import com.knight.service.Knight; import com.quest.service.Quest; pub...2014-04-04 16:35:51 · 301 阅读 · 0 评论 -
Spring Bean简单应用实例
学习的Spring实战(第三版)Bean的简单应用1.创建一个表演者的接口 package com.performer.service; public interface Performer { void perform(); } 2.创建一个杂技师表演者Bean,杂技师空中抛球(beanBags),抛的越多越厉害,默认有3个 package com.performer...2014-04-11 16:12:32 · 190 阅读 · 0 评论 -
Spring Aop demo
做了个Spring Aop的Demo,记录一下。 在Sping Bean的基础上,增加“观众”的角色,观众在观看表演之前,要就坐,关掉手机,观看之后,鼓掌或者对表演不满,要求退票。 package com.audience; public class Audience { public void takeSeat() { System.out.println("ta...2014-04-21 12:54:19 · 150 阅读 · 0 评论 -
org.springframework.beans.factory.BeanDefinitionStoreException
学习Aop时遇到如下异常: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [spring12.xml]; nested exception is java.lang.NoC...2014-04-21 13:16:54 · 181 阅读 · 0 评论 -
org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
Console: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'duke' defined in class path resource [spring12.xml]: BeanPostProcessor be...2014-04-21 13:22:57 · 164 阅读 · 0 评论 -
$Proxy0 cannot be cast to com.performer.service.impl.PoeticJuggler
在测试Spring Aop时遇到如下异常: Exception in thread "main" java.lang.ClassCastException: $Proxy0 cannot be cast to com.performer.service.impl.PoeticJuggler 代码如下所示: package com.test; import org.spring...2014-04-21 13:36:12 · 182 阅读 · 0 评论 -
声明环绕通知
编写watchPerformance() public void watchPerformance(ProceedingJoinPoint joinpoint) { try { System.out.println("take seat"); System.out.println("trun off phone"); long start = System.cu...2014-04-21 15:10:17 · 310 阅读 · 0 评论