首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >升级SpringBoot2.2.9后,upgrade到2.3.2.upgrade服务无法工作

升级SpringBoot2.2.9后,upgrade到2.3.2.upgrade服务无法工作
EN

Stack Overflow用户
提问于 2020-08-09 21:22:03
回答 1查看 931关注 0票数 0

我的spring启动微服务目前使用Spring-Boot2.2.9运行。

代码语言:javascript
复制
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.9.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

我也还用

  • spring-cloud-starter-sleuth 2.2.4
  • spring-cloud-starter-zipkin 2.2.4
  • spring-boot-starter-data-rest 2.2.9
  • spring-boot-starter-quartz 2.2.9
  • spring-boot-configuration-processor 2.2.9
  • spring-boot-starter-web 2.2.9
  • spring-cloud-starter-netflix-eureka-client 2.2
    • Spring-Cloud Hoxton.SR7.4
    • spring-boot-starter-actuator 2.2.9
    • spring-boot-starter-data-jpa 2.2.9

  • PostgreSQL
  • Logstash 6.4
  • 日志2.1.4
  • Lombok 1.18.12

依赖项。

现在我想要切换到SpringBoot2.3.2.RELEASE,我可以编译代码而没有任何错误。启动服务后,我看到

信息: HHH000490:使用JtaPlatform实现:JtaPlatform

日志信息。现在出现了错误。然后部署过程停止。什么都没发生。

目前我不知道为什么它不运行。有人有什么建议吗?

EN

回答 1

Stack Overflow用户

发布于 2020-08-30 19:28:14

我想我找到问题了。

代码语言:javascript
复制
@EnableEurekaClient
@EnableScheduling
@SpringBootApplication
@EnableAsync
public class AccountApplication {

    public static void main(String[] args) {
        SpringApplication.run(AccountApplication.class, args);
    }

    @Bean("threadPoolTaskExecutor")
    public Executor asyncExecutor() {
        final ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(20);
        executor.setMaxPoolSize(1000);
        executor.setThreadNamePrefix("AsyncThread-");
        executor.initialize();
        return executor;
    }

}

而不是我在代码中使用了Exceutor:

代码语言:javascript
复制
   @Async("threadPoolTaskExecutor")
   public CompletableFuture<ServiceAccountDTO> registerAccountInService(final String uuid, final ServiceEnum serviceEnum,
                                                                             final Date creationDate, final Date realCreationDate) {
    ..
    }

使用此配置,服务没有正确启动。

现在,@Bean("threadPoolTaskExecutor")配置被删除,我只使用@异步。

但是为什么它不能使用2.3.x呢?日志中没有错误信息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63331441

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档