DineshK
DineshK

Reputation: 1

No ConnectionDetails found for source '@ServiceConnection source for Bean

I am trying to test sqs messaging in my local with local docker environment folowing a tutorial

But i am stuck with below issue.

git repo

Caused by: org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsNotFoundException: No ConnectionDetails found for source '@ServiceConnection source for Bean 'localStackContainer' defined in class path resource [com/mycompany/sqsDemo/SqsLiveTestConfiguration.class]'

Only difference i see is i am using the latest version of spring boot 3.4.1,

<properties>
    <spring-cloud-aws.version>3.3.0</spring-cloud-aws.version>
    <maven.surefire.version>3.1.0</maven.surefire.version>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <spring-framework.version>6.2.2</spring-framework.version>
    <java.version>21</java.version>
</properties>

    private static final String LOCAL_STACK_VERSION = "localstack/localstack:3.4.0";

@Bean
@ServiceConnection(name = "sqs")
public LocalStackContainer localStackContainer() {
    return new LocalStackContainer(DockerImageName.parse(LOCAL_STACK_VERSION));
}

Upvotes: 0

Views: 78

Answers (0)

Related Questions