Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
51978dd6
apollo
项目概览
wrr-cat
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
51978dd6
编写于
3月 23, 2016
作者:
J
Jason Song
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #26 from yiming187/rename
Rename Server to Service
上级
cff6c15f
1068abe3
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
44 addition
and
32 deletion
+44
-32
apollo-adminservice/pom.xml
apollo-adminservice/pom.xml
+2
-2
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/AdminServiceApplication.java
...om/ctrip/apollo/adminservice/AdminServiceApplication.java
+1
-1
apollo-adminservice/src/main/resources/application.yml
apollo-adminservice/src/main/resources/application.yml
+2
-2
apollo-adminservice/src/main/resources/bootstrap.yml
apollo-adminservice/src/main/resources/bootstrap.yml
+0
-0
apollo-configservice/pom.xml
apollo-configservice/pom.xml
+2
-3
apollo-configservice/src/main/java/com/ctrip/apollo/ServerApplication.java
...ice/src/main/java/com/ctrip/apollo/ServerApplication.java
+0
-0
apollo-configservice/src/main/java/com/ctrip/apollo/ServletInitializer.java
...ce/src/main/java/com/ctrip/apollo/ServletInitializer.java
+0
-0
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/controller/ConfigController.java
...rip/apollo/configservice/controller/ConfigController.java
+1
-1
apollo-configservice/src/main/java/com/ctrip/apollo/metaservice/controller/ServiceController.java
...trip/apollo/metaservice/controller/ServiceController.java
+11
-6
apollo-configservice/src/main/java/com/ctrip/apollo/metaservice/service/DiscoveryService.java
...om/ctrip/apollo/metaservice/service/DiscoveryService.java
+9
-5
apollo-configservice/src/main/resources/application.yml
apollo-configservice/src/main/resources/application.yml
+2
-2
apollo-configservice/src/main/resources/bootstrap.yml
apollo-configservice/src/main/resources/bootstrap.yml
+0
-0
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/AbstractConfigServiceTest.java
...ctrip/apollo/configservice/AbstractConfigServiceTest.java
+2
-2
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/AllTests.java
...rc/test/java/com/ctrip/apollo/configservice/AllTests.java
+3
-2
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/controller/ConfigControllerTest.java
...apollo/configservice/controller/ConfigControllerTest.java
+2
-1
apollo-configservice/src/test/resources/application.yml
apollo-configservice/src/test/resources/application.yml
+1
-1
apollo-configservice/src/test/resources/bootstrap.yml
apollo-configservice/src/test/resources/bootstrap.yml
+0
-0
apollo-core/src/main/java/com/ctrip/apollo/core/ServiceIdConsts.java
.../src/main/java/com/ctrip/apollo/core/ServiceIdConsts.java
+4
-2
pom.xml
pom.xml
+2
-2
未找到文件。
apollo-
configadmin
/pom.xml
→
apollo-
adminservice
/pom.xml
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
51978dd6
文件已移动
apollo-configserv
er
/pom.xml
→
apollo-configserv
ice
/pom.xml
浏览文件 @
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
浏览文件 @
51978dd6
文件已移动
apollo-configserv
er
/src/main/java/com/ctrip/apollo/ServletInitializer.java
→
apollo-configserv
ice
/src/main/java/com/ctrip/apollo/ServletInitializer.java
浏览文件 @
51978dd6
文件已移动
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
51978dd6
文件已移动
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
51978dd6
文件已移动
apollo-core/src/main/java/com/ctrip/apollo/core/ServiceIdConsts.java
浏览文件 @
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
浏览文件 @
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>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录