spring-redis-test.xml 1.58 KB
<?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/aop"
	   xmlns:context="http://www.springframework.org/schema/context"
	   xmlns:task="http://www.springframework.org/schema/task"
	   xsi:schemaLocation="http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/aop
      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

	<context:component-scan base-package="com.yoho.core.redis"/>

	<bean id="propertyConfigurer"
		  class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="location">
			<value>classpath:config.properties</value>
		</property>
	</bean>

	<!--service接口调用拦截器-->
	<bean id="serviceMethodInterceptor" class="com.yoho.core.common.monitor.interceptor.MethodProfileInterceptor">
	</bean>
	<aop:config>
		<aop:pointcut id="serviceMethodPoint"
					  expression="(execution(* com.yoho.*.*.service.*.*(..)))
					  or (execution(* com.yoho.core.redis.YH*Operations.*(..)))
					  or (execution(* com.yoho.*.*.restapi.*.*(..))) "/>
		<aop:advisor pointcut-ref="serviceMethodPoint" advice-ref="serviceMethodInterceptor"/>
	</aop:config>



</beans>