java - Spring aop:config -
i new using spring framework... first there error
the prefix aop element aop config not bound and added following spring.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> now there still error
error occured processing xml 'org/springframework/aop/aspectj/aspectjmethodbeforeadvice' here complete xml file
<?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:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <aop:config> <aop:aspect ref="audience"> <aop:before pointcut="execution(* com.uttara.spring.performer.perform(..))" method="takeseats" /> <aop:before pointcut="execution(* com.uttara.spring.performer.perform(..))" method="switchoffphones" /> <aop:after-returning pointcut="execution(* com.uttara.spring.performer.perform(..))" method="clap" /> <aop:after-throwing pointcut="execution(* com.uttara.spring.performer.perform(..))" method="boo" /> </aop:aspect> </aop:config> <bean id="duke" class="com.uttara.spring.juggler"> <constructor-arg value="15"></constructor-arg> </bean> <bean id="poem" class="com.uttara.spring.englishpoem"></bean> <bean id="hans" class="com.uttara.spring.poeticjuggler"> <constructor-arg value="15"></constructor-arg> <constructor-arg ref="poem"></constructor-arg> </bean> <bean id="audience" class="com.uttara.spring.audience"></bean> </beans> please help! have absolutely no clue. have few library files. don't know do. there libraries missing? causing these errors? how fix it?
using spring requires lot of library files. aspectjrt, aspectj-weaver, aop-alliance few, don't spring dependancy jar files. have download, , add classpath run spring based applications successfully.
Comments
Post a Comment