aspectj Questions

2

What is the right way to create an aspect around Kotlin suspended function? From my observation, Micrometer's @Timed aspect does work with them, but shows incorrect result - looks like it measures...
Retro asked 29/12, 2018 at 22:11

2

Solved

I'm trying to enable LoadTimeWeaving in spring boot project. What I've done so far: Added @EnableLoadTimeWeaving annotation Added vm options when running the application (-javaagent:path/to/spring...

8

I'm trying to use Lombok in combination with AspectJ and Maven. So, what's the problem? When I use the AspectJ Maven Plugin (www.mojohaus.org/aspectj-maven-plugin/), it takes the sources and compil...
Caretaker asked 28/1, 2017 at 12:53

5

I recently started working on AspectJ and wrote a simple Aspect for Logging. I have defined below dependencies into my pom file: <dependency> <groupId>org.aspectj</groupId> &...
Trueman asked 14/2, 2016 at 14:24

11

I am new to Spring Transaction. Something that I found really odd, probably I did understand this properly. I wanted to have a transactional around method level and I have a caller method within ...
Inclement asked 6/8, 2010 at 13:1

2

Solved

I am trying to write Junit tests for Custom Aspect. Here is the Aspect Class Snippet: @Aspect @Component public class SampleAspect { private static Logger log = LoggerFactory.getLogger(SampleAsp...
Meredi asked 30/12, 2016 at 0:21

4

I am using spring-data-neo4j 3.4.2, which is (optionally) using AspectJ. My IDE is IntelliJ IDEA 16 (EAP, IU-144.3891.8). I have had the same problem using latest IntelliJ IDEA 15. Everything wor...
Cubature asked 18/2, 2016 at 11:4

3

Solved

I'm a beginner in AspectJ so please guide me to resolve the issue happening as per the below approach. @Aspect public class TestAop { @Pointcut("execution(public * com.packg.foo.ClassOne.*(.....
Nonintervention asked 18/7, 2012 at 13:9

1

After changing the Java version to 17 I can't build the Gradle project. I am using Gradle 7.3.1 version and have the following line in Gradle properties: org.gradle.jvmargs=-Dfile.encoding=UTF-8 -X...
Cloraclorinda asked 3/12, 2021 at 13:5

6

Solved

I created a simple aspect in Spring using Spring Boot 2.1.6.RELEASE. It basically logs the total time spent on a method. @Aspect @Component public class TimeLoggerAspect { private static final L...
Myocarditis asked 25/6, 2019 at 23:2

17

Solved

I'm learning Aspect Oriented Programming concepts and Spring AOP. I'm failing to understand the difference between a Pointcut and a Joinpoint - both of them seem to be the same for me. A Pointcut i...
Geometric asked 16/3, 2013 at 8:53

3

Solved

Is it possible to register AOP advices programmatically, after the application has booted and the context has been initialized? When I tried, the advices didn't work, supposedly because they need ...
Billionaire asked 2/3, 2018 at 15:48

3

I need to measure method-metrics using micrometer @Timed annotation. As it doesn't work on arbitrary methods; i added the configuration of @TimedAspect explicitly in my spring config. Have referred...
Biquadrate asked 30/5, 2019 at 11:14

4

I am trying to use AOP to do some processing after an annotated controller. Everything is running with no errors, but the advice is not being executed. Here is the controller code: @Controller p...
Faraday asked 22/7, 2010 at 14:46

4

Solved

In my project I have a domain layer which is basically POJO and a Spring controller / service layer that is sitting on top of the domain layer. I also have an AOP layer which is sitting between the...
Cere asked 17/7, 2014 at 7:17

3

Solved

I am using Spring AOP/AspectJ in my Spring Boot API to make an annotation in Java like @TrackExecutionTime, that I can slap on any method and it logs the total time it took the method to run. This ...
Carreno asked 22/2, 2021 at 21:8

3

Solved

I'm trying to exclude several methods from log files using aspectj (Im usong spring and Load-time weaving). Is there a way to list the excluded methods in the aop.xml? I know i can do this for full...
Crandell asked 30/12, 2013 at 7:53

4

Solved

Can any one tell me what is the difference between Joinpoint and Proceedingjoinpoint? When to use Joinpoint and Proceedingjoinpoint in the method of aspect class? I used the JoinPoint in my Aspec...
Youlandayoulton asked 3/4, 2013 at 7:28

17

I'm working on a project that has lots of different Maven projects. I've been doing a bunch of JUnit testing on these projects, and usually this goes well. I open up Eclipse, right click in package...
Stillman asked 17/1, 2012 at 16:11

3

Solved

I have a service-layer Interface that extends from a base Interface; I would like to create a Pointcut around my service-layer Interface, but on one of the methods defined in the base Interface. F...
Symmetry asked 10/2, 2011 at 14:35

3

Solved

It is my first approaching to AOP. I've a spring-boot application with one Aspect, a Logger. Searching i reach to the conclusion that the @Around method executes before, and after the method (I'm c...
Dentate asked 10/2, 2020 at 17:51

5

Solved

We used aspectJ to get some metric on an existing application. When building and weaving with AJDT in eclipse, everything works great. But in the integration env. we use an ant script to build and ...
Orgell asked 12/7, 2011 at 14:33

3

I just finished posting this issue on SO about Lombok not generating my getters/setters. It turns out that it is conflicting with AspectJ. If I disable AspectJ, then the getters/setters are appropr...
Hance asked 18/9, 2014 at 3:25

2

Solved

I am trying to write Integratation tests for Custom Aspect. Here is the Aspect Class Snippet. @Aspect @Component public class SampleAspect { private static Logger log = LoggerFactory.getLogger(S...
Seifert asked 3/1, 2017 at 15:16

9

I am trying to create a timer aspect for measuring methods run time. I created an annotation named @Timer: @Retention(RetentionPolicy.RUNTIME) @Target(value = {ElementType.METHOD, ElementType.TYP...
Giovannagiovanni asked 14/8, 2016 at 14:20

© 2022 - 2024 — McMap. All rights reserved.