-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ConnectionsDetails and ServiceConnections for Spring Boot 3.1 #793
Comments
Thanks @eddumelendez! There is no way to make ServiceConnections contribute to environment properties instead of changing autoconfigurations to rely on ConnectionDetails? This would be ideal as we could likely continue to maintain single Springs Cloud AWS version for both Spring Boot 3.0 and 3.1 |
It will work until OOTB support is added in spring-cloud-aws. |
It still feels suboptimal. I don't get why Spring Boot does not make it easier to extend for 3rd party libraries. To have an option to pass something like a service connection configurer: @TestConfiguration(proxyBeanMethods = false)
public class MyContainersConfiguration {
@Bean
@ServiceConnection(LocalstackServiceConnectionConfigurer.class)
public LocalstackContainer localstackContainer() {
return new LocalstackContainer();
}
}
class LocalstackServiceConnectionConfigurer implements ServiceConnectionConfigurer { // i made up this interface
void apply(LocalstackContainer container, DynamicPropertyRegistry properties) {
// set properties
}
} Probably there is a reason why such thing does not exist, or maybe its something to discuss with the Spring Boot team. I am trying to come up with reasonable option where we don't end up in maintenance hell with multiple versions of Spring Cloud AWS. |
That's something that @philwebb and I have discussed while prototyping ideas around the service accounts. The problem is that @Bean
public LocalstackContainer localstackContainer(DynamicPropertyRegistry properties) {
var localstack = new LocalstackContainer();
// populate properties from the container
return localstack;
} |
@maciejwalkowiak I was thinking something more, in application-test.yaml having something like this:
And this will:
Something like this: |
How could I help to speed this up? @MatejNedic @maciejwalkowiak |
@maciejwalkowiak should we target this for 3.1.0 ? |
I think the date for 3.1 will be dictated by Spring Boot and Spring Cloud release, but yes it would be nice to have in 3.1. I guess this shouldn't be much work the question is who has time ;) |
@maciejwalkowiak @MatejNedic I could try |
@poklakni go for it. PRs welcome! |
I have a little problem with file placement. I created
But then where should I create Right now I have all 3 classes in This is what I have so far https://github.com/poklakni/spring-cloud-aws/commit/d13267d0cba7910e4d387e80aa3412d4034f0558 |
👍🏽
When I thought about this, I have the same idea about having If your concern is about circular dependency between |
Woop, happy news! 🎉 |
Type: Feature
First of all, congrats for 3.0.0 release! 🎉
Is your feature request related to a problem? Please describe.
I'm pretty sure you are already having this in mind but just want to sync. This is not a problem but a nice feature when used with upcoming spring boot 3.1 version which can auto-configure spring cloud aws properties (endpoint, access key, secret key, region) when using LocalStackContainer and it can enable Dev Mode too
Describe the solution you'd like
Update existing autoconfigurations to use ConnectionDetails for the properties I mentioned above. Add a new module,
spring-cloud-aws-testcontainers
which will add aContainerConnectionsDetailsFactory
.Describe alternatives you've considered
Unless, spring cloud aws provides initial support for ConnectionDetails there is no much to be done.
Additional context
I can contribute this feature but would like to know the timeline for this 😁
The text was updated successfully, but these errors were encountered: