Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
openSource
apollo
Commits
51978dd6
Commit
51978dd6
authored
Mar 23, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from yiming187/rename
Rename Server to Service
parents
cff6c15f
1068abe3
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
44 additions
and
32 deletions
+44
-32
pom.xml
apollo-adminservice/pom.xml
+2
-2
AdminServiceApplication.java
...om/ctrip/apollo/adminservice/AdminServiceApplication.java
+1
-1
application.yml
apollo-adminservice/src/main/resources/application.yml
+2
-2
bootstrap.yml
apollo-adminservice/src/main/resources/bootstrap.yml
+0
-0
pom.xml
apollo-configservice/pom.xml
+2
-3
ServerApplication.java
...ice/src/main/java/com/ctrip/apollo/ServerApplication.java
+0
-0
ServletInitializer.java
...ce/src/main/java/com/ctrip/apollo/ServletInitializer.java
+0
-0
ConfigController.java
...rip/apollo/configservice/controller/ConfigController.java
+1
-1
ServiceController.java
...trip/apollo/metaservice/controller/ServiceController.java
+11
-6
DiscoveryService.java
...om/ctrip/apollo/metaservice/service/DiscoveryService.java
+9
-5
application.yml
apollo-configservice/src/main/resources/application.yml
+2
-2
bootstrap.yml
apollo-configservice/src/main/resources/bootstrap.yml
+0
-0
AbstractConfigServiceTest.java
...ctrip/apollo/configservice/AbstractConfigServiceTest.java
+2
-2
AllTests.java
...rc/test/java/com/ctrip/apollo/configservice/AllTests.java
+3
-2
ConfigControllerTest.java
...apollo/configservice/controller/ConfigControllerTest.java
+2
-1
application.yml
apollo-configservice/src/test/resources/application.yml
+1
-1
bootstrap.yml
apollo-configservice/src/test/resources/bootstrap.yml
+0
-0
ServiceIdConsts.java
.../src/main/java/com/ctrip/apollo/core/ServiceIdConsts.java
+4
-2
pom.xml
pom.xml
+2
-2
No files found.
apollo-
configadmin
/pom.xml
→
apollo-
adminservice
/pom.xml
View file @
51978dd6
...
...
@@ -8,8 +8,8 @@
<relativePath>
../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apollo-
configadmin
</artifactId>
<name>
Apollo
ConfigAdmin
</name>
<artifactId>
apollo-
adminservice
</artifactId>
<name>
Apollo
AdminService
</name>
<dependencies>
<!-- apollo -->
<dependency>
...
...
apollo-
configadmin/src/main/java/com/ctrip/apollo/configadmin
/AdminServiceApplication.java
→
apollo-
adminservice/src/main/java/com/ctrip/apollo/adminservice
/AdminServiceApplication.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
configadmin
;
package
com
.
ctrip
.
apollo
.
adminservice
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
...
...
apollo-
configadmin
/src/main/resources/application.yml
→
apollo-
adminservice
/src/main/resources/application.yml
View file @
51978dd6
spring
:
application
:
name
:
apollo-
configadmin
name
:
apollo-
adminservice
server
:
port
:
${port:8080}
...
...
@@ -8,5 +8,5 @@ server:
logging
:
level
:
org.springframework.cloud
:
'
DEBUG'
file
:
/opt/logs/apollo-
configadmin
.log
file
:
/opt/logs/apollo-
adminservice
.log
apollo-
configadmin
/src/main/resources/bootstrap.yml
→
apollo-
adminservice
/src/main/resources/bootstrap.yml
View file @
51978dd6
File moved
apollo-configserv
er
/pom.xml
→
apollo-configserv
ice
/pom.xml
View file @
51978dd6
...
...
@@ -8,9 +8,8 @@
<relativePath>
../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apollo-configserver
</artifactId>
<name>
Apollo ConfigServer
</name>
<packaging>
war
</packaging>
<artifactId>
apollo-configservice
</artifactId>
<name>
Apollo ConfigService
</name>
<dependencies>
<!-- apollo -->
<dependency>
...
...
apollo-configserv
er
/src/main/java/com/ctrip/apollo/ServerApplication.java
→
apollo-configserv
ice
/src/main/java/com/ctrip/apollo/ServerApplication.java
View file @
51978dd6
File moved
apollo-configserv
er
/src/main/java/com/ctrip/apollo/ServletInitializer.java
→
apollo-configserv
ice
/src/main/java/com/ctrip/apollo/ServletInitializer.java
View file @
51978dd6
File moved
apollo-configserv
er/src/main/java/com/ctrip/apollo/configserver
/controller/ConfigController.java
→
apollo-configserv
ice/src/main/java/com/ctrip/apollo/configservice
/controller/ConfigController.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
configserv
er
.
controller
;
package
com
.
ctrip
.
apollo
.
configserv
ice
.
controller
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.service.ConfigService
;
...
...
apollo-configserv
er/src/main/java/com/ctrip/apollo/metaserver
/controller/ServiceController.java
→
apollo-configserv
ice/src/main/java/com/ctrip/apollo/metaservice
/controller/ServiceController.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
metaserv
er
.
controller
;
package
com
.
ctrip
.
apollo
.
metaserv
ice
.
controller
;
import
java.util.List
;
...
...
@@ -6,7 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.metaserv
er
.service.DiscoveryService
;
import
com.ctrip.apollo.metaserv
ice
.service.DiscoveryService
;
import
com.netflix.appinfo.InstanceInfo
;
@RestController
...
...
@@ -18,12 +18,17 @@ public class ServiceController {
@RequestMapping
(
"/meta"
)
public
List
<
InstanceInfo
>
metaServer
()
{
return
discoveryService
.
getMetaServ
erServiceInstance
();
public
List
<
InstanceInfo
>
getMetaService
()
{
return
discoveryService
.
getMetaServ
iceInstances
();
}
@RequestMapping
(
"/config"
)
public
List
<
InstanceInfo
>
configServer
()
{
return
discoveryService
.
getConfigServerServiceInstance
();
public
List
<
InstanceInfo
>
getConfigService
()
{
return
discoveryService
.
getConfigServiceInstances
();
}
@RequestMapping
(
"/admin"
)
public
List
<
InstanceInfo
>
getAdminService
(){
return
discoveryService
.
getAdminServiceInstances
();
}
}
apollo-configserv
er/src/main/java/com/ctrip/apollo/metaserver
/service/DiscoveryService.java
→
apollo-configserv
ice/src/main/java/com/ctrip/apollo/metaservice
/service/DiscoveryService.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
metaserv
er
.
service
;
package
com
.
ctrip
.
apollo
.
metaserv
ice
.
service
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -17,14 +17,18 @@ public class DiscoveryService {
@Autowired
private
EurekaClient
eurekaClient
;
public
List
<
InstanceInfo
>
getConfigServ
erServiceInstance
()
{
Application
application
=
eurekaClient
.
getApplication
(
ServiceIdConsts
.
APOLLO_CONFIGSERV
ER
);
public
List
<
InstanceInfo
>
getConfigServ
iceInstances
()
{
Application
application
=
eurekaClient
.
getApplication
(
ServiceIdConsts
.
APOLLO_CONFIGSERV
ICE
);
return
application
!=
null
?
application
.
getInstances
()
:
new
ArrayList
<>();
}
public
List
<
InstanceInfo
>
getMetaServ
erServiceInstance
()
{
Application
application
=
eurekaClient
.
getApplication
(
ServiceIdConsts
.
APOLLO_METASERV
ER
);
public
List
<
InstanceInfo
>
getMetaServ
iceInstances
()
{
Application
application
=
eurekaClient
.
getApplication
(
ServiceIdConsts
.
APOLLO_METASERV
ICE
);
return
application
!=
null
?
application
.
getInstances
()
:
new
ArrayList
<>();
}
public
List
<
InstanceInfo
>
getAdminServiceInstances
(){
Application
application
=
eurekaClient
.
getApplication
(
ServiceIdConsts
.
APOLLO_ADMINSERVICE
);
return
application
!=
null
?
application
.
getInstances
()
:
new
ArrayList
<>();
}
}
apollo-configserv
er
/src/main/resources/application.yml
→
apollo-configserv
ice
/src/main/resources/application.yml
View file @
51978dd6
spring
:
application
:
name
:
apollo-configserv
er
name
:
apollo-configserv
ice
server
:
port
:
${port:80}
...
...
@@ -8,5 +8,5 @@ server:
logging
:
level
:
org.springframework.cloud
:
'
DEBUG'
file
:
/opt/logs/apollo-configserv
er
.log
file
:
/opt/logs/apollo-configserv
ice
.log
apollo-configserv
er
/src/main/resources/bootstrap.yml
→
apollo-configserv
ice
/src/main/resources/bootstrap.yml
View file @
51978dd6
File moved
apollo-configserv
er/src/test/java/com/ctrip/apollo/configserver/AbstractConfigServer
Test.java
→
apollo-configserv
ice/src/test/java/com/ctrip/apollo/configservice/AbstractConfigService
Test.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
configserv
er
;
package
com
.
ctrip
.
apollo
.
configserv
ice
;
import
com.ctrip.apollo.ServerApplication
;
import
org.junit.runner.RunWith
;
...
...
@@ -7,6 +7,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
ServerApplication
.
class
)
public
abstract
class
AbstractConfigServ
er
Test
{
public
abstract
class
AbstractConfigServ
ice
Test
{
}
apollo-configserv
er/src/test/java/com/ctrip/apollo/configserver
/AllTests.java
→
apollo-configserv
ice/src/test/java/com/ctrip/apollo/configservice
/AllTests.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
configserv
er
;
package
com
.
ctrip
.
apollo
.
configserv
ice
;
import
com.ctrip.apollo.configserver.controller.ConfigControllerTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
import
com.ctrip.apollo.configservice.controller.ConfigControllerTest
;
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
ConfigControllerTest
.
class
...
...
apollo-configserv
er/src/test/java/com/ctrip/apollo/configserver
/controller/ConfigControllerTest.java
→
apollo-configserv
ice/src/test/java/com/ctrip/apollo/configservice
/controller/ConfigControllerTest.java
View file @
51978dd6
package
com
.
ctrip
.
apollo
.
configserv
er
.
controller
;
package
com
.
ctrip
.
apollo
.
configserv
ice
.
controller
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.service.ConfigService
;
import
com.ctrip.apollo.configservice.controller.ConfigController
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
apollo-configserv
er
/src/test/resources/application.yml
→
apollo-configserv
ice
/src/test/resources/application.yml
View file @
51978dd6
...
...
@@ -7,7 +7,7 @@ logging:
spring
:
application
:
name
:
apollo-configserv
er
name
:
apollo-configserv
ice
datasource
:
url
:
jdbc:h2:file:~/fxapolloconfigdb;DB_CLOSE_ON_EXIT=FALSE
username
:
sa
...
...
apollo-configserv
er
/src/test/resources/bootstrap.yml
→
apollo-configserv
ice
/src/test/resources/bootstrap.yml
View file @
51978dd6
File moved
apollo-core/src/main/java/com/ctrip/apollo/core/ServiceIdConsts.java
View file @
51978dd6
...
...
@@ -2,9 +2,11 @@ package com.ctrip.apollo.core;
public
class
ServiceIdConsts
{
public
static
final
String
APOLLO_METASERV
ER
=
"apollo-metaserver
"
;
public
static
final
String
APOLLO_METASERV
ICE
=
"apollo-metaservice
"
;
public
static
final
String
APOLLO_CONFIGSERV
ER
=
"apollo-configserver
"
;
public
static
final
String
APOLLO_CONFIGSERV
ICE
=
"apollo-configservice
"
;
public
static
final
String
APOLLO_ADMINSERVICE
=
"apollo-adminservice"
;
public
static
final
String
APOLLO_PORTAL
=
"apollo-portal"
;
}
pom.xml
View file @
51978dd6
...
...
@@ -67,8 +67,8 @@
<module>
apollo-core
</module>
<module>
apollo-client
</module>
<module>
apollo-biz
</module>
<module>
apollo-configserv
er
</module>
<module>
apollo-
configadmin
</module>
<module>
apollo-configserv
ice
</module>
<module>
apollo-
adminservice
</module>
<module>
apollo-portal
</module>
<module>
apollo-demo
</module>
</modules>
...
...
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