I have recently upgraded application from Spring 4.3.x and JDK 8 with AspectJ 1.8.10 to JDK 17 with Spring 5.3.x and AspectJ 1.9.20.1 and Transactional annotation seems to be not working
In application configuration there is
<tx:annotation-driven transaction-manager="transactionManager" mode="aspectj"/>
<context:load-time-weaver/>
I tried defining AnnotationTransactionAspect, changing AspectJ version but nothing seems to help resolve this issue.
Did you read the "Use LTW on Java 16+" part of the release notes? For load-time weaving, you need to add
--add-opens java.base/java.lang=ALL-UNNAMEDto your JVM command line.