Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
04eeea4f
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,发现更多精彩内容 >>
提交
04eeea4f
编写于
3月 25, 2016
作者:
J
Jason Song
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #43 from nobodyiam/integrate-admin-portal
portal and admin integration
上级
e1e07b34
157eba07
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
20 deletion
+21
-20
apollo-adminservice/src/main/java/com/ctrip/apollo/AdminServiceApplication.java
...c/main/java/com/ctrip/apollo/AdminServiceApplication.java
+2
-1
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
...src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
+4
-4
apollo-biz/src/main/resources/import.sql
apollo-biz/src/main/resources/import.sql
+11
-11
apollo-core/src/main/java/com/ctrip/apollo/core/Constants.java
...o-core/src/main/java/com/ctrip/apollo/core/Constants.java
+1
-1
apollo-demo/src/main/java/com/ctrip/apollo/demo/service/DemoService.java
.../main/java/com/ctrip/apollo/demo/service/DemoService.java
+1
-1
apollo-demo/src/main/webapp/s/templates/list.html
apollo-demo/src/main/webapp/s/templates/list.html
+1
-1
apollo-portal/src/main/resources/application.yml
apollo-portal/src/main/resources/application.yml
+1
-1
未找到文件。
apollo-adminservice/src/main/java/com/ctrip/apollo/AdminServiceApplication.java
浏览文件 @
04eeea4f
...
...
@@ -2,10 +2,11 @@ package com.ctrip.apollo;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@SpringBootApplication
//
@EnableEurekaClient
@EnableEurekaClient
public
class
AdminServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
AdminServiceApplication
.
class
).
web
(
true
).
run
(
args
);
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
浏览文件 @
04eeea4f
...
...
@@ -39,16 +39,16 @@ public class ConfigItem {
@Column
private
String
comment
;
@Column
@Column
(
name
=
"DataChange_CreatedBy"
)
private
String
dataChangeCreatedBy
;
@Column
@Column
(
name
=
"DataChange_CreatedTime"
)
private
Date
dataChangeCreatedTime
;
@Column
@Column
(
name
=
"DataChange_LastModifiedBy"
)
private
String
dataChangeLastModifiedBy
;
@Column
@Column
(
name
=
"DataChange_LastTime"
)
private
Date
dataChangeLastModifiedTime
;
@Column
...
...
apollo-biz/src/main/resources/import.sql
浏览文件 @
04eeea4f
INSERT
INTO
Cluster
(
AppId
,
IsDeleted
,
Name
)
VALUES
(
100
,
0
,
'default'
);
INSERT
INTO
Cluster
(
ID
,
AppId
,
IsDeleted
,
Name
)
VALUES
(
100
,
6666
,
0
,
'default
-cluster-name
'
);
INSERT
INTO
Cluster
(
ID
,
AppId
,
IsDeleted
,
Name
)
VALUES
(
100
,
6666
,
0
,
'default'
);
INSERT
INTO
Cluster
(
ID
,
AppId
,
IsDeleted
,
Name
)
VALUES
(
101
,
6666
,
0
,
'cluster1'
);
INSERT
INTO
Version
(
AppId
,
IsDeleted
,
Name
,
ReleaseId
)
VALUES
(
101
,
0
,
'1.0'
,
1
);
...
...
@@ -7,20 +7,20 @@ INSERT INTO Version (AppId, IsDeleted, Name, ReleaseId) VALUES (102, 0, '1.0', 2
INSERT
INTO
Version
(
ID
,
AppId
,
IsDeleted
,
Name
,
ReleaseId
)
VALUES
(
100
,
6666
,
0
,
'1.0'
,
11111
);
INSERT
INTO
Version
(
ID
,
AppId
,
IsDeleted
,
Name
,
ReleaseId
)
VALUES
(
101
,
6666
,
0
,
'2.0'
,
11112
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
1
,
'{"apollo.foo":"bar", "apollo.bar":"foo"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
2
,
'{"demo.foo":"demo1", "demo.bar":"demo2"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default-cluster-name'
,
0
,
11111
,
'{"6666.foo":"demo1", "6666.bar":"demo2","3333.foo":"1008","4444.bar":"99901"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
1
,
'{"101.foo":"bar", "101.bar":"foo"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
2
,
'{"102.foo":"demo1", "102.bar":"demo2"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
3
,
'{"101.foo":"another bar", "101.bar_new":"foo"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
11111
,
'{"6666.foo":"demo1", "6666.bar":"demo2","3333.foo":"1008","4444.bar":"99901"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'cluster1'
,
0
,
11111
,
'{"6666.foo":"demo1"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'cluster2'
,
0
,
11111
,
'{"6666.bar":"bar2222"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default
-cluster-name
'
,
0
,
11112
,
'{"6666.foo":"verson2.0", "6666.bar":"verson2.0","3333.foo":"1008","4444.bar":"99901"}'
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
11112
,
'{"6666.foo":"verson2.0", "6666.bar":"verson2.0","3333.foo":"1008","4444.bar":"99901"}'
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
dataChangeCreatedBy
,
dataChangeCreatedTime
,
dataChangeLastModifiedBy
,
dataChangeLastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default-cluster-name
'
,
6666
,
'6666.k1'
,
'6666.v1'
,
'comment1'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
DataChange_CreatedBy
,
DataChange_CreatedTime
,
DataChange_LastModifiedBy
,
DataChange_LastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default
'
,
6666
,
'6666.k1'
,
'6666.v1'
,
'comment1'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
dataChangeCreatedBy
,
dataChangeCreatedTime
,
dataChangeLastModifiedBy
,
dataChangeLastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default-cluster-name
'
,
6666
,
'6666.k2'
,
'6666.v2'
,
'xxxx'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五1'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
DataChange_CreatedBy
,
DataChange_CreatedTime
,
DataChange_LastModifiedBy
,
DataChange_LastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default
'
,
6666
,
'6666.k2'
,
'6666.v2'
,
'xxxx'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五1'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
dataChangeCreatedBy
,
dataChangeCreatedTime
,
dataChangeLastModifiedBy
,
dataChangeLastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default-cluster-name
'
,
6666
,
'6666.k3'
,
'6666.v3'
,
'yyyy'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五2'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
DataChange_CreatedBy
,
DataChange_CreatedTime
,
DataChange_LastModifiedBy
,
DataChange_LastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default
'
,
6666
,
'6666.k3'
,
'6666.v3'
,
'yyyy'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五2'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
dataChangeCreatedBy
,
dataChangeCreatedTime
,
dataChangeLastModifiedBy
,
dataChangeLastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default-cluster-name
'
,
5555
,
'5555.k1'
,
'5555.v11'
,
'zzzz'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五3'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
DataChange_CreatedBy
,
DataChange_CreatedTime
,
DataChange_LastModifiedBy
,
DataChange_LastModifiedTime
,
IsDeleted
)
VALUES
(
100
,
'default
'
,
5555
,
'5555.k1'
,
'5555.v11'
,
'zzzz'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五3'
,
NOW
(),
0
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
dataChangeCreatedBy
,
dataChangeCreatedTime
,
dataChangeLastModifiedBy
,
dataChangeLastModifiedTime
,
IsDeleted
)
VALUES
(
101
,
'cluster1'
,
6666
,
'6666.k1'
,
'6666.v122'
,
'qqqqq'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五4'
,
NOW
(),
0
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
3
,
'{"apollo.foo":"another bar", "apollo.bar_new":"foo"}'
);
INSERT
INTO
ConfigItem
(
ClusterId
,
ClusterName
,
AppId
,
Key
,
Value
,
comment
,
DataChange_CreatedBy
,
DataChange_CreatedTime
,
DataChange_LastModifiedBy
,
DataChange_LastModifiedTime
,
IsDeleted
)
VALUES
(
101
,
'cluster1'
,
6666
,
'6666.k1'
,
'6666.v122'
,
'qqqqq'
,
'lepdou'
,
'2016-03-23 12:00:00'
,
'王五4'
,
NOW
(),
0
);
apollo-core/src/main/java/com/ctrip/apollo/core/Constants.java
浏览文件 @
04eeea4f
...
...
@@ -2,6 +2,6 @@ package com.ctrip.apollo.core;
public
interface
Constants
{
String
DEFAULT_CLUSTER_NAME
=
"default
-cluster-name
"
;
String
DEFAULT_CLUSTER_NAME
=
"default"
;
}
apollo-demo/src/main/java/com/ctrip/apollo/demo/service/DemoService.java
浏览文件 @
04eeea4f
...
...
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
public
class
DemoService
{
private
String
foo
;
@Value
(
"${
apollo
.foo}"
)
@Value
(
"${
101
.foo}"
)
private
void
setFoo
(
String
foo
)
{
this
.
foo
=
foo
;
}
...
...
apollo-demo/src/main/webapp/s/templates/list.html
浏览文件 @
04eeea4f
...
...
@@ -59,7 +59,7 @@
ng-submit=
"demoCtrl.queryInjectedConfig()"
>
<div
class=
"form-group"
>
<div
class=
"clearfix"
>
<label
class=
"col-sm-2 control-label"
>
apollo
.foo
</label>
<label
class=
"col-sm-2 control-label"
>
101
.foo
</label>
<div
class=
"col-sm-3"
>
<input
type=
"text"
name=
"injectedConfigValue"
class=
"form-control"
ng-model=
"demoCtrl.injectedConfigValue"
readonly
/>
...
...
apollo-portal/src/main/resources/application.yml
浏览文件 @
04eeea4f
server
:
port
:
80
8
0
port
:
80
7
0
spring
:
application
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录