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
157eba07
Commit
157eba07
authored
Mar 25, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portal and admin integration
parent
e1e07b34
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
20 deletions
+21
-20
AdminServiceApplication.java
...c/main/java/com/ctrip/apollo/AdminServiceApplication.java
+2
-1
ConfigItem.java
...src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
+4
-4
import.sql
apollo-biz/src/main/resources/import.sql
+11
-11
Constants.java
...o-core/src/main/java/com/ctrip/apollo/core/Constants.java
+1
-1
DemoService.java
.../main/java/com/ctrip/apollo/demo/service/DemoService.java
+1
-1
list.html
apollo-demo/src/main/webapp/s/templates/list.html
+1
-1
application.yml
apollo-portal/src/main/resources/application.yml
+1
-1
No files found.
apollo-adminservice/src/main/java/com/ctrip/apollo/AdminServiceApplication.java
View file @
157eba07
...
@@ -2,10 +2,11 @@ package com.ctrip.apollo;
...
@@ -2,10 +2,11 @@ package com.ctrip.apollo;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
@SpringBootApplication
@SpringBootApplication
//
@EnableEurekaClient
@EnableEurekaClient
public
class
AdminServiceApplication
{
public
class
AdminServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
new
SpringApplicationBuilder
(
AdminServiceApplication
.
class
).
web
(
true
).
run
(
args
);
new
SpringApplicationBuilder
(
AdminServiceApplication
.
class
).
web
(
true
).
run
(
args
);
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
View file @
157eba07
...
@@ -39,16 +39,16 @@ public class ConfigItem {
...
@@ -39,16 +39,16 @@ public class ConfigItem {
@Column
@Column
private
String
comment
;
private
String
comment
;
@Column
@Column
(
name
=
"DataChange_CreatedBy"
)
private
String
dataChangeCreatedBy
;
private
String
dataChangeCreatedBy
;
@Column
@Column
(
name
=
"DataChange_CreatedTime"
)
private
Date
dataChangeCreatedTime
;
private
Date
dataChangeCreatedTime
;
@Column
@Column
(
name
=
"DataChange_LastModifiedBy"
)
private
String
dataChangeLastModifiedBy
;
private
String
dataChangeLastModifiedBy
;
@Column
@Column
(
name
=
"DataChange_LastTime"
)
private
Date
dataChangeLastModifiedTime
;
private
Date
dataChangeLastModifiedTime
;
@Column
@Column
...
...
apollo-biz/src/main/resources/import.sql
View file @
157eba07
INSERT
INTO
Cluster
(
AppId
,
IsDeleted
,
Name
)
VALUES
(
100
,
0
,
'default'
);
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
Cluster
(
ID
,
AppId
,
IsDeleted
,
Name
)
VALUES
(
101
,
6666
,
0
,
'cluster1'
);
INSERT
INTO
Version
(
AppId
,
IsDeleted
,
Name
,
ReleaseId
)
VALUES
(
101
,
0
,
'1.0'
,
1
);
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
...
@@ -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
(
100
,
6666
,
0
,
'1.0'
,
11111
);
INSERT
INTO
Version
(
ID
,
AppId
,
IsDeleted
,
Name
,
ReleaseId
)
VALUES
(
101
,
6666
,
0
,
'2.0'
,
11112
);
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
,
1
,
'{"101.foo":"bar", "101.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'
,
0
,
2
,
'{"102.foo":"demo1", "102.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
,
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
(
'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
(
'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
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
);
INSERT
INTO
RELEASESNAPSHOT
(
ClusterName
,
IsDeleted
,
ReleaseId
,
Configurations
)
VALUES
(
'default'
,
0
,
3
,
'{"apollo.foo":"another bar", "apollo.bar_new":"foo"}'
);
apollo-core/src/main/java/com/ctrip/apollo/core/Constants.java
View file @
157eba07
...
@@ -2,6 +2,6 @@ package com.ctrip.apollo.core;
...
@@ -2,6 +2,6 @@ package com.ctrip.apollo.core;
public
interface
Constants
{
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
View file @
157eba07
...
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
...
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
public
class
DemoService
{
public
class
DemoService
{
private
String
foo
;
private
String
foo
;
@Value
(
"${
apollo
.foo}"
)
@Value
(
"${
101
.foo}"
)
private
void
setFoo
(
String
foo
)
{
private
void
setFoo
(
String
foo
)
{
this
.
foo
=
foo
;
this
.
foo
=
foo
;
}
}
...
...
apollo-demo/src/main/webapp/s/templates/list.html
View file @
157eba07
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
ng-submit=
"demoCtrl.queryInjectedConfig()"
>
ng-submit=
"demoCtrl.queryInjectedConfig()"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"clearfix"
>
<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"
>
<div
class=
"col-sm-3"
>
<input
type=
"text"
name=
"injectedConfigValue"
class=
"form-control"
<input
type=
"text"
name=
"injectedConfigValue"
class=
"form-control"
ng-model=
"demoCtrl.injectedConfigValue"
readonly
/>
ng-model=
"demoCtrl.injectedConfigValue"
readonly
/>
...
...
apollo-portal/src/main/resources/application.yml
View file @
157eba07
server
:
server
:
port
:
80
8
0
port
:
80
7
0
spring
:
spring
:
application
:
application
:
...
...
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