This repository was archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 369
@ConditionalOnAwsCloudEnvironment at method level #389
Labels
component: core
An issue related to core functionality - credentials, region resolution
help wanted
type: bug
A general bug
Milestone
Comments
Not sure. Do you want to experiment and try changing the phase and see if that help? That condition hits an aws endpoint, so that may have something to do with it as well. |
I was debugging the code and it never got to evaluate if the condition matched (at a method level), because the Returning |
It does appear that beans which are annotated |
PRs welcome |
maciejwalkowiak
pushed a commit
to maciejwalkowiak/spring-cloud-aws
that referenced
this issue
May 31, 2020
maciejwalkowiak
pushed a commit
to maciejwalkowiak/spring-cloud-aws
that referenced
this issue
Oct 15, 2020
maciejwalkowiak
pushed a commit
to maciejwalkowiak/spring-cloud-aws
that referenced
this issue
Oct 15, 2020
maciejwalkowiak
pushed a commit
to maciejwalkowiak/spring-cloud-aws
that referenced
this issue
Oct 15, 2020
maciejwalkowiak
pushed a commit
to maciejwalkowiak/spring-cloud-aws
that referenced
this issue
Oct 15, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
component: core
An issue related to core functionality - credentials, region resolution
help wanted
type: bug
A general bug
When setting @ConditionalOnAwsCloudEnvironment or @ConditionalOnMissingAwsCloudEnvironment (Srping Cloud 2.0.0) at a method level i would have expected the bean to be created on the environment that matches the condition, but instead it's ignored. It works fine at class level.
The below example will produce two beans with value "cloud" and "local" regardless of the environment.
Could it be related with the ConfigurationPhase?
https://github.com/spring-cloud/spring-cloud-aws/blob/3bfd3a537192cf38a14c7a0c8df16876511db42a/spring-cloud-aws-context/src/main/java/org/springframework/cloud/aws/context/annotation/OnAwsCloudEnvironmentCondition.java#L30-L33
The text was updated successfully, but these errors were encountered: