Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environmentWebEndpointExtension bean name used for two different classes #12827

Closed
JagmohanSharma opened this issue Apr 11, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@JagmohanSharma
Copy link

commented Apr 11, 2018

EnvironmentEndpointAutoConfiguration has a bean with name environmentWebEndpointExtension of type EnvironmentEndpointWebExtension and LifecycleMvcEndpointAutoConfiguration also has bean with same name environmentWebEndpointExtension but of type EnvironmentWebEndpointExtension which seems right.

I think we should change the name for bean of type EnvironmentEndpointWebExtension or I am missing something here?

Below from LifecycleMvcEndpointAutoConfiguration:

@Configuration
    @ConditionalOnClass(EnvironmentEndpoint.class)
    @ConditionalOnWebApplication
    protected static class EndpointConfiguration {
        @Bean
        @ConditionalOnBean(EnvironmentEndpoint.class)
        @ConditionalOnEnabledEndpoint
        public EnvironmentWebEndpointExtension environmentWebEndpointExtension(
                EnvironmentManager environment) {
            return new EnvironmentWebEndpointExtension(environment);
        }
    }

Below from EnvironmentEndpointAutoConfiguration:

@Bean
	@ConditionalOnMissingBean
	@ConditionalOnEnabledEndpoint
	@ConditionalOnBean(EnvironmentEndpoint.class)
	public EnvironmentEndpointWebExtension environmentWebEndpointExtension(
			EnvironmentEndpoint environmentEndpoint) {
		return new EnvironmentEndpointWebExtension(environmentEndpoint);
	}
@JagmohanSharma

This comment has been minimized.

Copy link
Author

commented Apr 11, 2018

Pull request requesting for this change.
#12829
Please review.

@snicoll

This comment has been minimized.

Copy link
Member

commented Apr 11, 2018

@JagmohanSharma thanks for the PR but I was already working on a solution. I've also raised spring-cloud/spring-cloud-commons#354 as I believe the naming in Spring Cloud is too broad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.