mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:25:50 +00:00
moved pointcut to @Repository instead of @Service
In that way we don't need a dedicated config file for the Service layer
This commit is contained in:
parent
5699bf83ee
commit
572ef6e2c4
5 changed files with 3 additions and 18 deletions
|
@ -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());
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?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>
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue