Spring cloud starter 任务:无法在 Spring boot 2.x 上工作

     2023-02-27     51

关键词:

【中文标题】Spring cloud starter 任务:无法在 Spring boot 2.x 上工作【英文标题】:Spring cloud starter task : Not able to work on Spring boot 2.x 【发布时间】:2018-07-22 14:59:59 【问题描述】:

我试图让spring boot batch application(2.0.0.RC1) 与Spring cloud starter task(2.0.0.M2) 一起工作。 在使 Spring cloud starter task 与 spring boot 2.x 批处理应用程序一起工作时出现一系列错误。

我能够使用Spring cloud starter task(2.0.0.M2) 成功运行批处理应用程序spring-boot-starter-parent(1.5.10.RELEASE)。

这是截图

但是当我尝试使用Spring cloud starter task(2.0.0.M2)spring boot 2.0.0.RC1 时,出现以下错误。

com.fasterxml.jackson.databind.exc.InvalidTypeIdException: 无法将类型 id '' 解析为 [simple type, class java.lang.Object] 的子类型:

这是相同的屏幕截图。

所以我决定将 Spring boot 降级为 2.0.0.M7。唉,我遇到了一个不同的异常。

java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@61f78561 已经关闭。

为什么会发生这种异常?任何帮助/指南将不胜感激。

【问题讨论】:

【参考方案1】:

Spring Boot 上游发生了相当多的变化,导致 Spring Cloud Task 的 2.0 出现了副作用。

我们已经解决了所有问题(一些在 Boot 本身中) - 请参阅 here。

我们的目标是在本周发布 2.0 M3 版本,所以在完成之前,也许您可​​以尝试在本地构建 2.0 BUILD-SNAPSHOT。如果您发现任何其他异常情况,请告诉我们。

【讨论】:

随手记录关于spring-cloud-starter-eureka-server和spring-cloud-starter-netflix-eureka-server

今天看书时候发现一个Maven引用 spring-cloud-starter-eureka-server 记得之前使用的都是spring-cloud-starter-netflix-eureka-server去maven仓库看了下 spring-cloud-starter-eureka-server 已经废弃,spring-cloud-starter-net 查看详情

为啥 spring-cloud-starter-config 忽略 bootstrap.properties?

】为啥spring-cloud-starter-config忽略bootstrap.properties?【英文标题】:Whybootstrap.propertiesisignoredbyspring-cloud-starter-config?为什么spring-cloud-starter-config忽略bootstrap.properties?【发布时间】:2021-03-1118:35:58【问题描述】:我的目标是从config- 查看详情

spring-cloud-gcp-starter-bigquery 从属性文件中忽略 spring.cloud.gcp.credentials.location

】spring-cloud-gcp-starter-bigquery从属性文件中忽略spring.cloud.gcp.credentials.location【英文标题】:spring-cloud-gcp-starter-bigqueryignoresspring.cloud.gcp.credentials.locationfrompropertyfile【发布时间】:2020-06-1519:38:24【问题描述】:我正在玩sprin 查看详情

当 spring-cloud-starter-zipkin 使用 zipkin.brave 时,为啥需要 Spring sleuth?

】当spring-cloud-starter-zipkin使用zipkin.brave时,为啥需要Springsleuth?【英文标题】:whyneedSpringsleuthwhenspring-cloud-starter-zipkinuseszipkin.brave?当spring-cloud-starter-zipkin使用zipkin.brave时,为什么需要Springsleuth?【发布时间】:2021-10-2520:52 查看详情

spring-boot-starter-webflux与spring-cloud-starter-openfeign冲突

ThuOct2217:16:01CST2020[3be84a1c-14]Therewasanunexpectederror(type=InternalServerError,status=500).Noqualifyingbeanoftype‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘available:ex 查看详情

如何在本地使用 spring-cloud-starter-aws 运行应用程序?

】如何在本地使用spring-cloud-starter-aws运行应用程序?【英文标题】:Howtoruntheappwithspring-cloud-starter-awslocally?【发布时间】:2020-07-1222:21:22【问题描述】:我需要在本地运行基于SpringBoot的应用程序。它使用spring-cloud-starter-aws依赖项... 查看详情

UserInfoRestTemplateFactory 设置因 ResourceServerConfigurerAdapter 和两个 spring-cloud-services-starter 失败

】UserInfoRestTemplateFactory设置因ResourceServerConfigurerAdapter和两个spring-cloud-services-starter失败【英文标题】:UserInfoRestTemplateFactorysetupfailswithResourceServerConfigurerAdapterandtwospring-cloud-services-starters【发布时间】:20 查看详情

无法使用 spring cloud gcp starter 将 Spring Boot 与 Cloud SQL 连接

】无法使用springcloudgcpstarter将SpringBoot与CloudSQL连接【英文标题】:CannotconnectSpringBootwithCloudSQLusingspringcloudgcpstarter【发布时间】:2018-12-1521:44:56【问题描述】:SpringBoot新手试图将我的应用托管在GCPAppEngineFlexiblewithCloudSQL(mysql),第... 查看详情

springcloudcouldnotfindartifactorg.springframework.cloud:spring-cloud-starter-xxx(代码片段)

【问题现象】IDEA中搭建SpringCloud体系,运行时提示红色错误:Couldnotfindartifactorg.springframework.cloud:spring-cloud-starter-xxxx:pom:unknownincentral(https://repo.maven.apache.org/maven2)【原因】对应的包没有加载进来。【解决】 查看详情

org.springframework.cloud:spring-cloud-starter-eureka:unknown报错解决;

查看详情

带有 spring-boot-starter-web 的 Spring Cloud Gateway

】带有spring-boot-starter-web的SpringCloudGateway【英文标题】:SpringCloudGatewaywithspring-boot-starter-web【发布时间】:2021-04-0209:39:17【问题描述】:我正在使用SpringCloudGateway为SpringBoot微服务创建网关。Gateway还负责使用SpringSecurity进行JWT授权... 查看详情

spring-cloud-starter-ribbon 缺少 HTTP 客户端依赖项

】spring-cloud-starter-ribbon缺少HTTP客户端依赖项【英文标题】:MissingHTTPclientdependenciesforspring-cloud-starter-ribbon【发布时间】:2018-02-2610:53:33【问题描述】:我有一个简单的SpringBoot应用程序,它有一个简单的REST客户端,看起来像这样... 查看详情

当我使用 Finchley.M5 时 spring-cloud-starter-eureka 没有解决

】当我使用Finchley.M5时spring-cloud-starter-eureka没有解决【英文标题】:spring-cloud-starter-eurekaisnotresolvingwheniuseFinchley.M5【发布时间】:2018-07-2318:48:27【问题描述】:尝试使用springcloudgateway创建自己的api网关下面是我的build.gradle文件,b... 查看详情

spring-security-oauth2 vs spring-cloud-starter-oauth2

】spring-security-oauth2vsspring-cloud-starter-oauth2【英文标题】:【发布时间】:2019-04-2905:25:25【问题描述】:我正在使用SpringBoot构建一个oAuth2应用程序。但是,在Github中有各种使用spring-security-oauth2和spring-cloud-starter-oauth2的示例项目。... 查看详情

Maven Build-[错误] org.springframework.cloud:spring-cloud-starter-zuul:jar 的“dependencies.dependency.v

】MavenBuild-[错误]org.springframework.cloud:spring-cloud-starter-zuul:jar的“dependencies.dependency.version”缺失。@第28行,第15列【英文标题】:MavenBuild-[ERROR]\'dependencies.dependency.version\'fororg.springframework.cloud:spring-cloud- 查看详情

Spring Boot 无法运行依赖于 spring-cloud-starter-config 的 schema.sql

】SpringBoot无法运行依赖于spring-cloud-starter-config的schema.sql【英文标题】:SpringBootfailstorunschema.sqlwithdependencyonspring-cloud-starter-config【发布时间】:2018-10-0316:46:24【问题描述】:我的springboot2.0应用程序识别并运行schema.sql来初始化我... 查看详情

如何使用 spring-cloud-starter-config 传递 X-Config-Token

】如何使用spring-cloud-starter-config传递X-Config-Token【英文标题】:HowtopassX-Config-Tokenwithspring-cloud-starter-config【发布时间】:2020-04-1703:39:18【问题描述】:当我使用curl-XGEThttp://localhost:8888/limits-service/dev-H"X-Config-Token:s.6S92v3 查看详情

将 spring-cloud-starter-dataflow-server-local 升级到 1.3.0 时生成错误

】将spring-cloud-starter-dataflow-server-local升级到1.3.0时生成错误【英文标题】:Builderrorwhenupgradespring-cloud-starter-dataflow-server-localto1.3.0【发布时间】:2018-08-0114:20:49【问题描述】:以前我使用的是spring-cloud-starter-dataflow-server-local1.2.3 查看详情