Spring-2020-02 spring-03-aop examples has been modifyed

This commit is contained in:
stvort
2020-03-07 00:33:10 +04:00
parent 846cfd3220
commit 1fb4d29c86
45 changed files with 9 additions and 14 deletions
@@ -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>
@@ -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-03aop-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>
@@ -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>
@@ -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>
@@ -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 {
@@ -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 {
@@ -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>