Code Monkey home page Code Monkey logo

Comments (9)

jonpeterson avatar jonpeterson commented on May 22, 2024 15

FWIW, I agree with @drekka. I came here with the same issue. Now I need to go figure out what version of AspectJ to manually include.

EDIT:
For anyone else who comes across this and is also using Spring Boot, including spring-boot-starter-aop solved this for me and ensured versioning compatibility with the rest of Spring Boot.

from spring-retry.

drekka avatar drekka commented on May 22, 2024 8

Given that annotations are the way things are going, I would suggest that making AspectJ a dependency would be a good idea. XML configs are old school (and a pain to maintain) and programmatic is what people do when they need something not provided by out of the box annotations.

from spring-retry.

selimok avatar selimok commented on May 22, 2024 6

I agree with @drekka too.

My workaround was to add following dependency into my pom:

<dependency>
	<groupId>org.springframework</groupId>
	<artifactId>spring-aspects</artifactId>
</dependency>

from spring-retry.

garyrussell avatar garyrussell commented on May 22, 2024 1

AspectJ is only needed if you are using @Retry annotations so the project doesn't have it as a hard dependency because it's not needed if you are programmatically configuring or using XML.

from spring-retry.

garyrussell avatar garyrussell commented on May 22, 2024

spring-retry has no runtime dependencies on AspectJ.

Perhaps something else in your application is referencing it?

from spring-retry.

ek-ex avatar ek-ex commented on May 22, 2024

I have the same problem as drekka, it's a completely new project just to test spring-retry with only spring retry and spring boot.

from spring-retry.

Ghilteras avatar Ghilteras commented on May 22, 2024

I tried adding both spring-aspects and spring-aop together with aspectjtools aspectjrt and aspectjweaver but I keep getting
java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Pointcut
same thing with spring-boot-starter-aop so I'm not sure what to do next at this point

The relevant part of my Spring xml looks like this

        xmlns:aop="http://www.springframework.org/schema/aop"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
                           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
       default-init-method="initialize" default-destroy-method="destroy">
    <context:annotation-config />

    <aop:aspectj-autoproxy />

    <bean class="org.springframework.retry.annotation.RetryConfiguration" />

I am just trying to be able to use a @Retryable annotation before one of my methods

from spring-retry.

dsyer avatar dsyer commented on May 22, 2024

Sound like you need to read up on Spring AOP (and probably stop using <aop:aspectj-autoproxy/>). Anyway this is kind of unrelated to the original (closed) issue.

from spring-retry.

Ghilteras avatar Ghilteras commented on May 22, 2024

I only use Spring AOP because it's needed by Spring Retry and I don't have a @Configuration class so I need to do it with xml. Not sure why I should stop using <aop:aspectj-autoproxy/>

Will file a new issue, thanks.

from spring-retry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.