spring-cloud / spring-cloud/spring-cloud-commons

Inconsistent spring.cloud.util.enabled property

Open
#631 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
Java
Stars
751
Forks
744
Avg merge
1d 14h
Merged PRs (30d)
9

Description

Bug report

Hi, I noticed some inconsistency regarding properties.

Setting spring.cloud.util.enabled: false prevents the application from starting because of SimpleDiscoveryClientAutoConfiguration and later on because of SimpleReactiveDiscoveryClientAutoConfiguration because they require a InetUtils bean provided by UtilAutoConfiguration.

This can be fixed by also disabling those 2 configuration classes by property but it feels a bit strange because they look unrelated to InetUtils.

I wanted to open a PR for this but I was mixed between suppressing the spring.cloud.util.enabled or turning the other 2 ClientDiscovery configuration conditional upon this property.

Thanks in advance for suggestions 😄

  • spring-cloud-commons 2.2.0.RC1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the conditions in SimpleDiscoveryClientAutoConfiguration.java, SimpleReactiveDiscoveryClientAutoConfiguration.java, and UtilAutoConfiguration.java. Trace how spring.cloud.util.enabled affects the InetUtils bean and the two discovery configurations. Done means disabling the utility property no longer causes startup failures from those configurations, with the intended behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.