#configure aspectj for working with method call point cut

1 messages · Page 1 of 1 (latest)

light grail
#

I want to do some sql query profile, for this i need to add advice around jdbc methods, since spring aop does not support this, i want to use aspect j

  1. what all dependencies to add
  2. how to configure to use aspectj instead of spring aop
oak crystalBOT
#

<@&987246399047479336> please have a look, thanks.

oak crystalBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If your code is long, or you have multiple files to share, consider posting it on sites like https://pastebin.com/ and share the link instead, that is easier to browse for helpers.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

hearty folio
light grail
#

this is my aspect test

#

here is my method

#

plugin section

#

dependencies

#

@hearty folio Is there anything else to be done

quasi jasper
#

Depending on the type of weaving you are doing, you may want to disable maven-compiler-plugin to ensure you're using ajc

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>${compiler-plugin.version}</version>
    <configuration>
        <source>${maven.compiler.source}</source>
        <target>${maven.compiler.target}</target>
        <excludes>
            <!-- also exclude all java files -->
            <exclude>**/*.java</exclude>
        </excludes>
    </configuration>
    <!-- skip default compile (otherwise it overrides aspectj's compiler) -->
    <executions>
        <execution>
            <id>default-compile</id>
            <phase>none</phase>
        </execution>
    </executions>
</plugin>
oak crystalBOT
quasi jasper
#

Since it looks like you are testing it too, also probably want to add <goal>test-compile</goal> to aspectj-maven-plugin also

light grail
#

I just tried with those.. and its still not working

#

Since we are using aspectj we dont need @EnableAspectJAutoProxy right...i have not added it