mirror of
https://github.com/OtusTeam/Spring.git
synced 2026-05-30 10:50:42 +00:00
Spring-2020-02 spring-03-aop examples has been modifyed
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ru.otus</groupId>
|
||||
<artifactId>spring-aop-classwork</artifactId>
|
||||
<artifactId>spring-03-aop-classwork</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
+1
-1
@@ -6,7 +6,7 @@ public class LoggingAspect {
|
||||
|
||||
public void logBefore(JoinPoint joinPoint) {
|
||||
System.out.println("Прокси : " + joinPoint.getThis().getClass().getName());
|
||||
System.out.println("Класс : " + joinPoint.getThis().getClass().getName());
|
||||
System.out.println("Класс : " + joinPoint.getTarget().getClass().getName());
|
||||
|
||||
System.out.println("Вызов метода : " + joinPoint.getSignature().getName());
|
||||
}
|
||||
@@ -5,14 +5,14 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ru.otus</groupId>
|
||||
<artifactId>spring-03—aop-demo</artifactId>
|
||||
<artifactId>spring-03-aop-demo</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>spring-03-ctw</module>
|
||||
<module>spring-03-ltw</module>
|
||||
<module>spring-03-native-aop</module>
|
||||
<module>spring-03-aop-ctw</module>
|
||||
<module>spring-03-aop-ltw</module>
|
||||
<module>spring-03-aop-native</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ru.otus</groupId>
|
||||
<artifactId>spring-03-ctw</artifactId>
|
||||
<artifactId>spring-03-aop-ctw</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<properties>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ru.otus</groupId>
|
||||
<artifactId>spring-03-ltw</artifactId>
|
||||
<artifactId>spring-03-aop-ltw</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<properties>
|
||||
-4
@@ -14,12 +14,8 @@ import ru.otus.spring.service.PersonService;
|
||||
Пример: "-javaagent:c:\Users\MyUserName\.m2\repository\org\aspectj\aspectjweaver\1.9.5\aspectjweaver-1.9.5.jar".
|
||||
Кавычки не вносим)
|
||||
3. Запускаем Main
|
||||
|
||||
-javaagent:c:\Users\StVort\.m2\repository\org\aspectj\aspectjweaver\1.9.5\aspectjweaver-1.9.5.jar
|
||||
-javaagent:c:\Users\StVort\.m2\repository\org\springframework\spring-instrument\5.2.1.RELEASE\spring-instrument-5.2.1.RELEASE.jar
|
||||
*/
|
||||
|
||||
//@EnableLoadTimeWeaving
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class Main {
|
||||
-1
@@ -5,7 +5,6 @@ import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Aspect
|
||||
public class LoggingAspect {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>ru.otus</groupId>
|
||||
<artifactId>spring-03-native-aop</artifactId>
|
||||
<artifactId>spring-03-aop-native</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<properties>
|
||||
Reference in New Issue
Block a user