Comments (9)
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.
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.
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.
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.
spring-retry
has no runtime dependencies on AspectJ.
Perhaps something else in your application is referencing it?
from spring-retry.
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.
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.
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.
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)
- A little idea about result filtering HOT 1
- backOffContext.getSleepAndIncrement() not using this.interval correctly when using supplier HOT 1
- put GAV in docs HOT 4
- Does it support springboot3? It seems that it cannot be used under springboot3. HOT 2
- `ExponentialBackOffContext` not considering the interval set by `application.properties` HOT 3
- No distinction in the logs between different retried methods HOT 2
- Wrong method recommended for build.gradle? HOT 2
- Exponential backoff stops being exponential after few iterations. HOT 4
- @Retryable annotation retrying with ExponentialBackOff instead of ExponentialRandomBackOff when randomExpression provided HOT 1
- new release to bump dependency `spring-core` HOT 3
- Upgrade to AspectJ 1.9.22
- Upgrade to AssertJ 3.25.3
- Upgrade to JUnit 5.10.2
- Upgrade to Log4J 2.23.1
- Upgrade to Mockito 5.11.0
- Upgrade to Spring Framework 6.0.20
- Upgrade to spring javaformat 0.0.41
- Upgrade to Maven Compiler Plugin 3.13.0
- Upgrade to Maven Sources Plugin 3.3.1
- Upgrade to Maven Surefire Plugin 3.2.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-retry.