spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

ConsulAutoConfiguration.consulRawClientBuilderSupplier conflict with JPA #797

Closed hanrw closed 2 years ago

hanrw commented 2 years ago

There's a issue which conflict JPA when start application after Migrate spring-boot from 3.0.0-M4 to 3.0.0-M5 and spring-cloud-dependencies 2022.0.0-M4 to 2022.0.0-M5 error logs

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 1 of method consulClient in org.springframework.cloud.consul.ConsulAutoConfiguration required a bean of type 'java.util.function.Supplier' that could not be found.

Action:
Consider defining a bean of type 'java.util.function.Supplier' in your configuration.

auto config logs:

   ConsulAutoConfiguration#consulRawClientBuilderSupplier:
      Did not match:
         - @ConditionalOnMissingBean (types: java.util.function.Supplier; SearchStrategy: all) found beans of type 'java.util.function.Supplier' jpa.DemoRepository.fragments#0 (OnBeanCondition)

and here's demo project to reproduce the problem. demo.zip

zhiwei55 commented 2 years ago

We just got same issue.can I know when this issue will be fixed?

hanrw commented 2 years ago

RC1 same issue.

muyuhui commented 2 years ago

I also had this problem with the M5 and RC1 versions. When will this change be included?

spencergibb commented 2 years ago

Closing in favor of #800