-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(apollo-biz): Use constructor injection instead of field inje…
…ction (#4826) * add tech-support-qq-4.png * Update README.md * Enhance the user experience in the scenario of submitting duplicate keys * Modify the key-value conflict exception prompt, adjust the code style * refactor(apollo-biz): Use constructor injection instead of field injection * [Clean code] Remove unused imports * Correct the test semantics of the test case in ItemSetControllerTest (#4823) * add tech-support-qq-4.png * Update README.md * Enhance the user experience in the scenario of submitting duplicate keys * Modify the key-value conflict exception prompt, adjust the code style * test(apollo-biz): Correct the test semantics of the test case in ItemSetControllerTest * test(apollo-biz): Optimize the test case for ItemSetControllerTest * test(apollo-biz): Optimize the test case for ItemSetControllerTest * test(apollo-biz): Optimize the test case for ItemSetControllerTest --------- Co-authored-by: Jason Song <[email protected]> * Refactor the code related to ReleaseMessage (#4822) * add tech-support-qq-4.png * Update README.md * Enhance the user experience in the scenario of submitting duplicate keys * Modify the key-value conflict exception prompt, adjust the code style * refactor(apollo-biz): Refactor the code related to ReleaseMessage * refactor(apollo-biz): Refactor the code related to ReleaseMessage * test(apollo-admin): Optimize the test case * test(apollo-admin): Optimize the test case --------- Co-authored-by: Jason Song <[email protected]> * refactor(apollo-biz): Use constructor injection instead of field injection * chore(apollo-portal): Adjusting the code style --------- Co-authored-by: Jason Song <[email protected]> Co-authored-by: ZhangJian He <[email protected]>
- Loading branch information
1 parent
11303c7
commit 2800a00
Showing
25 changed files
with
188 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,17 @@ | |
import com.google.common.base.Strings; | ||
|
||
import java.util.Objects; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
/** | ||
* @author Jason Song([email protected]) | ||
*/ | ||
public abstract class AbstractConfigService implements ConfigService { | ||
@Autowired | ||
private GrayReleaseRulesHolder grayReleaseRulesHolder; | ||
|
||
private final GrayReleaseRulesHolder grayReleaseRulesHolder; | ||
|
||
protected AbstractConfigService(final GrayReleaseRulesHolder grayReleaseRulesHolder) { | ||
this.grayReleaseRulesHolder = grayReleaseRulesHolder; | ||
} | ||
|
||
@Override | ||
public Release loadConfig(String clientAppId, String clientIp, String clientLabel, String configAppId, String configClusterName, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,26 @@ | |
|
||
import com.ctrip.framework.apollo.biz.entity.Release; | ||
import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; | ||
import com.ctrip.framework.apollo.biz.grayReleaseRule.GrayReleaseRulesHolder; | ||
import com.ctrip.framework.apollo.biz.service.ReleaseService; | ||
import com.ctrip.framework.apollo.core.dto.ApolloNotificationMessages; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
/** | ||
* config service with no cache | ||
* | ||
* @author Jason Song([email protected]) | ||
*/ | ||
public class DefaultConfigService extends AbstractConfigService { | ||
|
||
@Autowired | ||
private ReleaseService releaseService; | ||
private final ReleaseService releaseService; | ||
private final GrayReleaseRulesHolder grayReleaseRulesHolder; | ||
|
||
public DefaultConfigService(final ReleaseService releaseService, | ||
final GrayReleaseRulesHolder grayReleaseRulesHolder) { | ||
super(grayReleaseRulesHolder); | ||
this.releaseService = releaseService; | ||
this.grayReleaseRulesHolder = grayReleaseRulesHolder; | ||
} | ||
|
||
@Override | ||
protected Release findActiveOne(long id, ApolloNotificationMessages clientMessages) { | ||
|
Oops, something went wrong.