Inject InfoContributorProperties more precisely
Closes gh-15750
This commit is contained in:
parent
530c7bee71
commit
f23a0a5969
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -52,12 +52,6 @@ public class InfoContributorAutoConfiguration {
|
|||
*/
|
||||
public static final int DEFAULT_ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
|
||||
|
||||
private final InfoContributorProperties properties;
|
||||
|
||||
public InfoContributorAutoConfiguration(InfoContributorProperties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnEnabledInfoContributor("env")
|
||||
@Order(DEFAULT_ORDER)
|
||||
|
|
@ -71,8 +65,10 @@ public class InfoContributorAutoConfiguration {
|
|||
@ConditionalOnSingleCandidate(GitProperties.class)
|
||||
@ConditionalOnMissingBean
|
||||
@Order(DEFAULT_ORDER)
|
||||
public GitInfoContributor gitInfoContributor(GitProperties gitProperties) {
|
||||
return new GitInfoContributor(gitProperties, this.properties.getGit().getMode());
|
||||
public GitInfoContributor gitInfoContributor(GitProperties gitProperties,
|
||||
InfoContributorProperties infoContributorProperties) {
|
||||
return new GitInfoContributor(gitProperties,
|
||||
infoContributorProperties.getGit().getMode());
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
|||
Loading…
Reference in New Issue