@EnableAspectJAutoProxy does not work

I am using Spring Boot, and I would like to use AspectJ with it. The following works (of course): @Aspect @Component public class RequestMappingAspect { @Before("@annotation(org.springframework.web.bind.annotation.RequestMapping)") public void a

AOP with custom annotation in Super class does not work

custom annotation @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface CustomAnnotation { } custom annotation handler @Aspect public class TestAspectHandler { @Around("execution(@com.test.project.annotaion.CustomAnnotatio

The coverage of the Jacoco code is affected by AspectJ

We're using AspectJ in our project and also Jacoco for test coverage report, currently we're facing an issue that due to AspectJ changed the byte code during compiling phase, which makes the code coverage report not correct. One example is due to Asp

Spring 4 + aspects

I have problem with aspects. They don't firing. I have small aspect: @Aspect @Component public class SynchronizingAspect { @Pointcut("execution(public * *(..))") @Around("synchronize() && @annotation(Synchronized)") public void

Testability in AOP

I'm totally new in AOP world. After reading some books(ex, spring in action), I have a basic question for AOP -- How can we ensure AOP is still working or not working in existing system especially when the system is changing. You know in real world,

Spring AOP @Pointcut Does Not Fire @Before Method

I have an @Aspect and @Pointcut method annotated to fire @Before a @Controller request method, it seems to be matching (as I'm not getting any errors) but it is not firing my advice method at all. I changed my pointcut for testing purposes to be as s

aspectj-maven-plugin is not executed?

I am having problems building an AspectJ project using the aspectj-maven-plugin the project has only one aspect: src/main/java/org/lightforge/config/ConfigurationAspect.aj ConfigurationAspect.aj does some members introduction according to Ch5 of Aspe

Android and MonkeyTalk annotations?

I just tried to update my project which uses Android Annotations to include the MonkeyTalk agent. However, as soon as I switch the project to an AspectJ project, all my Android Annotations references are not recognized. Has anybody successfully used

How to cross annotated methods and constructors?

This is what I'm doing: @Aspect public class MethodLogger { @Around("(execution(* *(..)) || initialization(*.new(..))) && @annotation(Foo)") public Object wrap(ProceedingJoinPoint point) throws Throwable { // works fine, but only for met

How to make fun of an aspect

I am currently working on some monitoring tool using aspectj. Because this tool should be technology independent (as far as possible), I am not using Spring for injection. But I want my aspects to be unit-tested. Aspect example: @Aspect public class

What is the big idea behind the implementation AOP

I wanted to make it clear for me. I read about AOP concept and I understood that it's a great way to share cross cutting services. (logging, security, transaction...) But I would like to say/ask something about this idea and it's implementation. I re

Interception method of a tomcat application with aop

I have a problem which is hard to explain so lets get started: Context: I have a application running on a tomcat server Lets call it "admin". The admin have an import/export function. Our own application is an extension to that and we need to ga

tomcat 7 Spring 3.1 Eclipselink 2.3

I am trying to develop my first spring application and deploy it to tomcat 7. I created the project configuration and every thing was working fine. I faced a problem when I changed a onetoone field fetch mode to LAZY. I think the problem is with load

Why not autowiring a field in a GWT servlet in Spring Work?

Simply marking a field as @Autowired in a GWT servlet does not work as intended. The code will compile and the web application will start up - which means Spring was successfully able to autowire the field, but when the servlet is actually hit by cli

Can not integrate AspectJ with Maven

I banged my head for two days to integrate aspectj with maven, But did not work. I am writing a simple program with two advices (which works fine in eclipse, so I am sure it's not a code side error). I have recently started using maven for project bu

Let eclipse use maven to compile / weave my code

I am using compile time weaving with aspectj to weave in Spring's transactional code so I can use @Transactional. When i run maven compile from inside Eclipse (which uses the aspectj-maven-plugin), eclipse synchronizes to the tomcat server and all go

Spring and Eclipse Data Graph

Spent 2 days trying to understand how to enable Eclipse work with Spring Data Graph, have no idea yet. The code is like this: @NodeEntity public class Person { public Person() { } } ... public class App { public static void main(String[] args) { Pers

Get a return value or an exception from AspectJ?

I am able to get the signature and arguments from advised method calls, but I cannot figure out how to get the return values or exceptions. I'm kind of assuming that it can be done in some way using around and proceed.You can use after() returning an

Spring Roo - How to use it without AspectJ?

Is there a way to have Roo generate real POJOs and not AspectJ enhanced ones? I want more PO in my JOs, AJ make it look like POJOOS (POJOs on Steroids) to meI think Roo always creates projects using aspectj. However, you can do a "push in refactor&qu

Code analysis tools and inter-type declarations

I have a maven project generated by Spring Roo and use several tools (checkstyle, pmd etc.) to collect information about my project. (namely I am using codehaus' sonar for this) Roo makes heavy use of AspectJ Inter Type Declarations (ITD) to seperate