0

I have a Spring profile dbmigration that should not need the AWS SQS bean or configuration. However, I am not being able to disable this configuration when I run with this profile.

Those are the only dependencies I have in my project:

val awsSdkVersion = "1.12.131"
[...]
//  SQS Dependencies
    implementation("org.springframework.cloud:spring-cloud-aws-messaging:2.2.6.RELEASE")
    implementation("com.amazonaws:aws-java-sdk-core:$awsSdkVersion")
    implementation("com.amazonaws:aws-java-sdk-sts:$awsSdkVersion")

Here are some guides I tried to follow:

Also, I think is important to know that my configuration files are:

  • application.yml
  • application-dbmigration.yml

And I tried to change the library to: org.springframework.cloud:spring-cloud-starter-aws-messaging:2.2.6.RELEASE, also no success

Even tried to update to another version of this library:

val awsSdkVersion = "1.12.131"
val springCloudAwsVersion = "2.3.1"
[...]
    implementation("io.awspring.cloud:spring-cloud-aws-messaging:${springCloudAwsVersion}")
    implementation("io.awspring.cloud:spring-cloud-aws-autoconfigure:${springCloudAwsVersion}")
    implementation("com.amazonaws:aws-java-sdk-core:$awsSdkVersion")
    implementation("com.amazonaws:aws-java-sdk-sts:$awsSdkVersion")

No success.

I would prefer to do it through the configurations and application settings, instead of having to add @Profile("!dbmigration") in every Bean or Component related to SQS on my code.

Lavínia Beghini
  • 165
  • 1
  • 11

0 Answers0