Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
161fa850
Commit
161fa850
authored
Aug 04, 2019
by
小强
Committed by
Jason Song
Aug 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add property to control whether to enable embedded eureka server or not
parent
2d02cbf0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
apollo-configservice/src/main/config/application-github.properties
...nfigservice/src/main/config/application-github.properties
+4
-0
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServerEurekaClientConfigure.java
...ollo/configservice/ConfigServerEurekaClientConfigure.java
+16
-0
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServerEurekaServerConfigure.java
...ollo/configservice/ConfigServerEurekaServerConfigure.java
+16
-0
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServiceApplication.java
...mework/apollo/configservice/ConfigServiceApplication.java
+0
-1
No files found.
apollo-configservice/src/main/config/application-github.properties
View file @
161fa850
...
@@ -2,3 +2,7 @@
...
@@ -2,3 +2,7 @@
spring.datasource.url
=
${spring_datasource_url}
spring.datasource.url
=
${spring_datasource_url}
spring.datasource.username
=
${spring_datasource_username}
spring.datasource.username
=
${spring_datasource_username}
spring.datasource.password
=
${spring_datasource_password}
spring.datasource.password
=
${spring_datasource_password}
#apollo.eureka.server.enabled=true
#
apollo.eureka.client.enabled
=
true
\ No newline at end of file
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServerEurekaClientConfigure.java
0 → 100644
View file @
161fa850
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.context.annotation.Configuration
;
/**
* Start Eureka Client annotations according to configuration
*
* @author Zhiqiang Lin(linzhiqiang0514@163.com)
*/
@Configuration
@EnableEurekaClient
@ConditionalOnProperty
(
name
=
"apollo.eureka.client.enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
public
class
ConfigServerEurekaClientConfigure
{
}
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServerEurekaServerConfigure.java
0 → 100644
View file @
161fa850
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.cloud.netflix.eureka.server.EnableEurekaServer
;
import
org.springframework.context.annotation.Configuration
;
/**
* Start Eureka Server annotations according to configuration
*
* @author Zhiqiang Lin(linzhiqiang0514@163.com)
*/
@Configuration
@EnableEurekaServer
@ConditionalOnProperty
(
name
=
"apollo.eureka.server.enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
public
class
ConfigServerEurekaServerConfigure
{
}
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServiceApplication.java
View file @
161fa850
...
@@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
*/
*/
@EnableEurekaServer
@EnableAspectJAutoProxy
@EnableAspectJAutoProxy
@EnableAutoConfiguration
// (exclude = EurekaClientConfigBean.class)
@EnableAutoConfiguration
// (exclude = EurekaClientConfigBean.class)
@Configuration
@Configuration
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment