gpt4 book ai didi

java - 在 Spring Cloud AWS 中禁用 Cloudformation

转载 作者:IT老高 更新时间:2023-10-28 13:58:46 30 4
gpt4 key购买 nike

如何在使用 Spring Cloud AWS 的 Spring Boot 应用中禁用 Cloudformation?

在亚马逊上运行我的应用时,我不断收到此错误:

...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.aws.core.env.stack.config.StackResourceRegistryFactoryBean]: Factory method 'stackResourceRegistryFactoryBean' threw exception; nested exception is com.amazonaws.AmazonServiceException: Stack for i-b5ce9e32 does not exist (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 75b3076a-176d-11e6-90cc-b55a643dc6d6)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 82 more
Caused by: com.amazonaws.AmazonServiceException: Stack for i-b5ce9e32 does not exist (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 75b3076a-176d-11e6-90cc-b55a643dc6d6)
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1389)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:902)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.ja
...

我不想使用 cloudformation。 (至少现在是这样。)

最佳答案

我的 application.properties (spring boot) 文件中有以下行

cloud.aws.stack.auto=false

官方文档:4.5. CloudFormation configuration in Spring Boot

关于java - 在 Spring Cloud AWS 中禁用 Cloudformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37161989/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com