forked from alibaba/Sentinel
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7b7e05
commit 9c2a6f1
Showing
25 changed files
with
782 additions
and
244 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
32 changes: 32 additions & 0 deletions
32
sentinel-dashboard/src/main/java/com/alibaba/csp/sentinel/dashboard/config/ApolloConfig.java
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* coder4j.cn | ||
* Copyright (C) 2013-2019 All Rights Reserved. | ||
*/ | ||
package com.alibaba.csp.sentinel.dashboard.config; | ||
|
||
import com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* @author buhao | ||
* @version ApolloConfig.java, v 0.1 2019-09-06 10:56 buhao | ||
*/ | ||
@Configuration | ||
public class ApolloConfig { | ||
|
||
@Value("${apollo.portal.url}") | ||
private String apolloPortalUrl; | ||
@Value("${apollo.application.token}") | ||
private String apolloApplicationToken; | ||
|
||
@Bean | ||
public ApolloOpenApiClient apolloOpenApiClient() { | ||
return ApolloOpenApiClient.newBuilder() | ||
.withPortalUrl(apolloPortalUrl) | ||
.withToken(apolloApplicationToken) | ||
.build(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.