Migrating spring-cloud-aws-messaging to new Spring

674 Views Asked by At

I need to migrate spring-cloud-aws-messaging to another compatible lib with new Spring Version.

Because the last version of spring-cloud-aws-messaging has javax.servlet » javax.servlet-api as Provided Dependencies (1), and the new Spring Version uses Jakarta instead of Javax.

(1) https://mvnrepository.com/artifact/io.awspring.cloud/spring-cloud-aws-messaging/2.4.4

Another problem is that I have the error:

Caused by: java.lang.NoClassDefFoundError: org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver
    at io.awspring.cloud.messaging.listener.QueueMessageHandler.initArgumentResolvers(QueueMessageHandler.java:118)
    at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.afterPropertiesSet(AbstractMethodMessageHandler.java:237)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1816)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
    ... 161 more

Because PayloadArgumentResolver class was removed from Spring and QueueMessageHandler class tried to use It.

I tried to use this two libs, but It didnt work:

<artifactId>spring-cloud-aws-starter-sns</artifactId>
<artifactId>spring-cloud-aws-sqs</artifactId>
0

There are 0 best solutions below