spring-cloud / spring-cloud/spring-cloud-zookeeper

`@ConditionalOnProperty` target property with no metadata

Open
#174 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

task
Dominant language
Java
Stars
574
Forks
408
Avg merge
1d 12h
Merged PRs (30d)
4

Description

Several auto-configurations use a condition on a property that has no metadata. As a result, trying to use it to customize the auto-configuration lead to a warning in an IDE.

The report detected the following:

org.springframework.cloud.zookeeper.config.ZookeeperConfigAutoConfiguration [spring.cloud.zookeeper.config.enabled]
org.springframework.cloud.zookeeper.config.ZookeeperConfigAutoConfiguration.ZkRefreshConfiguration#configWatcher [spring.cloud.zookeeper.config.watcher.enabled]
org.springframework.cloud.zookeeper.discovery.ConditionalOnRibbonZookeeper [ribbon.zookeeper.enabled]
org.springframework.cloud.zookeeper.discovery.ZookeeperRibbonClientConfiguration#dependenciesBasedLoadBalancer [spring.cloud.zookeeper.dependency.ribbon.loadbalancer]
org.springframework.cloud.zookeeper.discovery.dependency.DependencyFeignClientAutoConfiguration [spring.cloud.zookeeper.dependency.headers.enabled]
org.springframework.cloud.zookeeper.discovery.dependency.DependencyRestTemplateAutoConfiguration [spring.cloud.zookeeper.dependency.resttemplate.enabled]
org.springframework.cloud.zookeeper.discovery.dependency.DependencyRibbonAutoConfiguration#loadBalancerClient [spring.cloud.zookeeper.dependency.ribbon.enabled]
org.springframework.cloud.zookeeper.serviceregistry.ZookeeperServiceRegistryAutoConfiguration [spring.cloud.service-registry.enabled]

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 locating the listed auto-configuration classes and their @ConditionalOnProperty declarations, then inspect how configuration metadata is generated for this project. Verify that each reported property has metadata and that the IDE warnings no longer appear for the listed conditions.

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.