Skip to content
Snippets Groups Projects
Commit 572ef6e2 authored by Mic's avatar Mic
Browse files

moved pointcut to @Repository instead of @Service

In that way we don't need a dedicated config file for the Service layer
parent 5699bf83
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,6 @@
<config>src/main/webapp/WEB-INF/mvc-view-config.xml</config>
<config>src/main/resources/spring/dao-config.xml</config>
<config>src/main/resources/spring/datasource-config.xml</config>
<config>src/main/resources/spring/service-config.xml</config>
</configs>
<configSets>
<configSet>
......@@ -24,7 +23,6 @@
<config>src/main/resources/spring/dao-config.xml</config>
<config>src/main/resources/spring/datasource-config.xml</config>
<config>src/main/resources/spring/jmx-aop-config.xml</config>
<config>src/main/resources/spring/service-config.xml</config>
</configs>
<profiles>
</profiles>
......
......@@ -55,7 +55,7 @@ public class CallMonitoringAspect {
}
@Around("within(@org.springframework.stereotype.Service *)")
@Around("within(@org.springframework.stereotype.Repository *)")
public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable {
if (this.isEnabled) {
StopWatch sw = new StopWatch(joinPoint.toShortString());
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Application context definition for PetClinic on JPA.
-->
<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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="org.springframework.samples.petclinic.service"/>
</beans>
\ No newline at end of file
......@@ -15,7 +15,7 @@
<!--
- POJOs labeled with the @Controller and @Service annotations are auto-detected.
-->
<context:component-scan base-package="org.springframework.samples.petclinic.web"/>
<context:component-scan base-package="org.springframework.samples.petclinic.web, org.springframework.samples.petclinic.service"/>
<mvc:annotation-driven conversion-service="conversionService"/>
......
......@@ -23,7 +23,7 @@ id="WebApp_ID" version="2.5">
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/dao-config.xml, classpath:spring/service-config.xml, classpath:spring/jmx-aop-config.xml</param-value>
<param-value>classpath:spring/dao-config.xml, classpath:spring/jmx-aop-config.xml</param-value>
</context-param>
<listener>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment