** Spring Boot 2.7.9**
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.9</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
这些Spring云依赖项
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-context</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-autoconfigure</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-starter-aws-secrets-manager-config</artifactId>
<version>2.4.2</version>
</dependency>
属性条目
cloud.aws.region.static=us-east-2
cloud.aws.region.auto=false
cloud.aws.stack.auto=false
服务器引导没有任何问题
** Spring Boot 3.0.2**
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.2</version>
<relativePath />
</parent>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-context</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-autoconfigure</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-starter-aws-secrets-manager-config</artifactId>
<version>2.4.4</version>
</dependency>
服务器因错误而停止
Field amazonS3Client in com.test.S3BucketStorageServiceImpl required a bean of type 'com.amazonaws.services.s3.AmazonS3' that could not be found. The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action: Consider defining a bean of type 'com.amazonaws.services.s3.AmazonS3' in your configuration.
我的问题:属性文件密钥名称是否已更改?
1条答案
按热度按时间koaltpgm1#
自动配置不起作用,因此我必须手动创建
Bean
这解决了问题