Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
superrain51
apollo
提交
9d19d637
apollo
项目概览
superrain51
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
9d19d637
编写于
3月 28, 2016
作者:
Y
Yiming Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor DTOConverter out of entity class
上级
8563b8b9
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
161 addition
and
85 deletion
+161
-85
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/ConverterUtils.java
...n/java/com/ctrip/apollo/biz/converter/ConverterUtils.java
+24
-0
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/DTOToEntityConverter.java
.../com/ctrip/apollo/biz/converter/DTOToEntityConverter.java
+40
-0
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/EntityToDTOConverter.java
.../com/ctrip/apollo/biz/converter/EntityToDTOConverter.java
+45
-0
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
...src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
+0
-17
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ReleaseSnapshot.java
...ain/java/com/ctrip/apollo/biz/entity/ReleaseSnapshot.java
+2
-12
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Version.java
...iz/src/main/java/com/ctrip/apollo/biz/entity/Version.java
+0
-11
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ReleaseSnapShotRepository.java
...trip/apollo/biz/repository/ReleaseSnapShotRepository.java
+4
-4
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/impl/AdminConfigServiceImpl.java
...ctrip/apollo/biz/service/impl/AdminConfigServiceImpl.java
+12
-7
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/impl/ConfigServiceImpl.java
.../com/ctrip/apollo/biz/service/impl/ConfigServiceImpl.java
+3
-3
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/impl/ConfigServiceImplTest.java
.../ctrip/apollo/biz/service/impl/ConfigServiceImplTest.java
+4
-4
pom.xml
pom.xml
+27
-27
未找到文件。
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/ConverterUtils.java
0 → 100644
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.converter
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
public
class
ConverterUtils
{
static
String
[]
getNullPropertyNames
(
Object
source
)
{
final
BeanWrapper
src
=
new
BeanWrapperImpl
(
source
);
java
.
beans
.
PropertyDescriptor
[]
pds
=
src
.
getPropertyDescriptors
();
Set
<
String
>
emptyNames
=
new
HashSet
<
String
>();
for
(
java
.
beans
.
PropertyDescriptor
pd
:
pds
)
{
Object
srcValue
=
src
.
getPropertyValue
(
pd
.
getName
());
if
(
srcValue
==
null
)
emptyNames
.
add
(
pd
.
getName
());
}
String
[]
result
=
new
String
[
emptyNames
.
size
()];
return
emptyNames
.
toArray
(
result
);
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/DTOToEntityConverter.java
0 → 100644
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.converter
;
import
org.springframework.beans.BeanUtils
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.ConfigItem
;
import
com.ctrip.apollo.biz.entity.ReleaseSnapshot
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.dto.ConfigItemDTO
;
import
com.ctrip.apollo.core.dto.ReleaseSnapshotDTO
;
import
com.ctrip.apollo.core.dto.VersionDTO
;
public
class
DTOToEntityConverter
{
public
static
Cluster
convert
(
ClusterDTO
source
)
{
Cluster
target
=
new
Cluster
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
ConfigItem
convert
(
ConfigItemDTO
source
)
{
ConfigItem
target
=
new
ConfigItem
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
ReleaseSnapshot
convert
(
ReleaseSnapshotDTO
source
)
{
ReleaseSnapshot
target
=
new
ReleaseSnapshot
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
Version
convert
(
VersionDTO
source
)
{
Version
target
=
new
Version
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/converter/EntityToDTOConverter.java
0 → 100644
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.converter
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.ConfigItem
;
import
com.ctrip.apollo.biz.entity.ReleaseSnapshot
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.dto.ConfigItemDTO
;
import
com.ctrip.apollo.core.dto.ReleaseSnapshotDTO
;
import
com.ctrip.apollo.core.dto.VersionDTO
;
public
class
EntityToDTOConverter
{
public
static
ClusterDTO
convert
(
Cluster
source
)
{
ClusterDTO
target
=
new
ClusterDTO
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
ConfigItemDTO
convert
(
ConfigItem
source
)
{
ConfigItemDTO
target
=
new
ConfigItemDTO
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
ReleaseSnapshotDTO
convert
(
ReleaseSnapshot
source
)
{
ReleaseSnapshotDTO
target
=
new
ReleaseSnapshotDTO
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
public
static
VersionDTO
convert
(
Version
source
)
{
VersionDTO
target
=
new
VersionDTO
();
BeanUtils
.
copyProperties
(
source
,
target
,
ConverterUtils
.
getNullPropertyNames
(
source
));
return
target
;
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ConfigItem.java
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.entity
;
package
com.ctrip.apollo.biz.entity
;
import
com.ctrip.apollo.core.dto.ConfigItemDTO
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
@@ -150,19 +148,4 @@ public class ConfigItem {
...
@@ -150,19 +148,4 @@ public class ConfigItem {
this
.
dataChangeLastModifiedTime
=
dataChangeLastModifiedTime
;
this
.
dataChangeLastModifiedTime
=
dataChangeLastModifiedTime
;
}
}
public
ConfigItemDTO
toDTO
()
{
ConfigItemDTO
dto
=
new
ConfigItemDTO
();
dto
.
setAppId
(
appId
);
dto
.
setId
(
id
);
dto
.
setClusterId
(
clusterId
);
dto
.
setClusterName
(
clusterName
);
dto
.
setDataChangeCreatedBy
(
dataChangeCreatedBy
);
dto
.
setDataChangeLastModifiedBy
(
dataChangeLastModifiedBy
);
dto
.
setDataChangeCreatedTime
(
dataChangeCreatedTime
);
dto
.
setDataChangeLastModifiedTime
(
dataChangeLastModifiedTime
);
dto
.
setKey
(
key
);
dto
.
setValue
(
value
);
dto
.
setComment
(
comment
);
return
dto
;
}
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ReleaseSnap
S
hot.java
→
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ReleaseSnap
s
hot.java
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.entity
;
package
com.ctrip.apollo.biz.entity
;
import
com.ctrip.apollo.core.dto.ReleaseSnapshotDTO
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
@@ -16,7 +14,7 @@ import javax.persistence.Id;
...
@@ -16,7 +14,7 @@ import javax.persistence.Id;
@Entity
@Entity
@Where
(
clause
=
"isDeleted = 0"
)
@Where
(
clause
=
"isDeleted = 0"
)
@SQLDelete
(
sql
=
"Update ReleaseSnapShot set isDeleted = 1 where id = ?"
)
@SQLDelete
(
sql
=
"Update ReleaseSnapShot set isDeleted = 1 where id = ?"
)
public
class
ReleaseSnap
S
hot
{
public
class
ReleaseSnap
s
hot
{
@Id
@Id
@GeneratedValue
@GeneratedValue
private
long
id
;
private
long
id
;
...
@@ -32,7 +30,7 @@ public class ReleaseSnapShot {
...
@@ -32,7 +30,7 @@ public class ReleaseSnapShot {
private
boolean
isDeleted
;
private
boolean
isDeleted
;
public
ReleaseSnap
S
hot
()
{
public
ReleaseSnap
s
hot
()
{
}
}
public
long
getId
()
{
public
long
getId
()
{
...
@@ -75,12 +73,4 @@ public class ReleaseSnapShot {
...
@@ -75,12 +73,4 @@ public class ReleaseSnapShot {
isDeleted
=
deleted
;
isDeleted
=
deleted
;
}
}
public
ReleaseSnapshotDTO
toDTO
()
{
ReleaseSnapshotDTO
dto
=
new
ReleaseSnapshotDTO
();
dto
.
setId
(
id
);
dto
.
setClusterName
(
clusterName
);
dto
.
setConfigurations
(
configurations
);
dto
.
setReleaseId
(
releaseId
);
return
dto
;
}
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Version.java
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.entity
;
package
com.ctrip.apollo.biz.entity
;
import
com.ctrip.apollo.core.dto.VersionDTO
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
@@ -84,13 +82,4 @@ public class Version {
...
@@ -84,13 +82,4 @@ public class Version {
this
.
parentVersion
=
parentVersion
;
this
.
parentVersion
=
parentVersion
;
}
}
public
VersionDTO
toDTO
()
{
VersionDTO
dto
=
new
VersionDTO
();
dto
.
setAppId
(
this
.
appId
);
dto
.
setId
(
this
.
id
);
dto
.
setName
(
this
.
name
);
dto
.
setParentVersion
(
this
.
parentVersion
);
dto
.
setReleaseId
(
this
.
releaseId
);
return
dto
;
}
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ReleaseSnapShotRepository.java
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.repository
;
package
com.ctrip.apollo.biz.repository
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
S
hot
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
s
hot
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
@@ -10,8 +10,8 @@ import java.util.List;
...
@@ -10,8 +10,8 @@ import java.util.List;
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
*/
*/
public
interface
ReleaseSnapShotRepository
public
interface
ReleaseSnapShotRepository
extends
PagingAndSortingRepository
<
ReleaseSnap
S
hot
,
Long
>
{
extends
PagingAndSortingRepository
<
ReleaseSnap
s
hot
,
Long
>
{
ReleaseSnap
S
hot
findByReleaseIdAndClusterName
(
long
releaseId
,
String
clusterName
);
ReleaseSnap
s
hot
findByReleaseIdAndClusterName
(
long
releaseId
,
String
clusterName
);
List
<
ReleaseSnap
S
hot
>
findByReleaseId
(
long
releaseId
);
List
<
ReleaseSnap
s
hot
>
findByReleaseId
(
long
releaseId
);
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/impl/AdminConfigServiceImpl.java
浏览文件 @
9d19d637
package
com.ctrip.apollo.biz.service.impl
;
package
com.ctrip.apollo.biz.service.impl
;
import
com.ctrip.apollo.biz.converter.EntityToDTOConverter
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.ConfigItem
;
import
com.ctrip.apollo.biz.entity.ConfigItem
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
S
hot
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
s
hot
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.repository.ClusterRepository
;
import
com.ctrip.apollo.biz.repository.ClusterRepository
;
import
com.ctrip.apollo.biz.repository.ConfigItemRepository
;
import
com.ctrip.apollo.biz.repository.ConfigItemRepository
;
...
@@ -39,15 +40,16 @@ public class AdminConfigServiceImpl implements AdminConfigService {
...
@@ -39,15 +40,16 @@ public class AdminConfigServiceImpl implements AdminConfigService {
return
Collections
.
EMPTY_LIST
;
return
Collections
.
EMPTY_LIST
;
}
}
List
<
ReleaseSnap
S
hot
>
releaseSnapShots
=
releaseSnapShotRepository
.
findByReleaseId
(
releaseId
);
List
<
ReleaseSnap
s
hot
>
releaseSnapShots
=
releaseSnapShotRepository
.
findByReleaseId
(
releaseId
);
if
(
releaseSnapShots
==
null
||
releaseSnapShots
.
size
()
==
0
)
{
if
(
releaseSnapShots
==
null
||
releaseSnapShots
.
size
()
==
0
)
{
return
Collections
.
EMPTY_LIST
;
return
Collections
.
EMPTY_LIST
;
}
}
List
<
ReleaseSnapshotDTO
>
result
=
new
ArrayList
<>(
releaseSnapShots
.
size
());
List
<
ReleaseSnapshotDTO
>
result
=
new
ArrayList
<>(
releaseSnapShots
.
size
());
for
(
ReleaseSnapShot
releaseSnapShot
:
releaseSnapShots
)
{
for
(
ReleaseSnapshot
releaseSnapShot
:
releaseSnapShots
)
{
result
.
add
(
releaseSnapShot
.
toDTO
());
ReleaseSnapshotDTO
dto
=
EntityToDTOConverter
.
convert
(
releaseSnapShot
);
result
.
add
(
dto
);
}
}
return
result
;
return
result
;
}
}
...
@@ -66,7 +68,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
...
@@ -66,7 +68,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
List
<
VersionDTO
>
result
=
new
ArrayList
<>(
versions
.
size
());
List
<
VersionDTO
>
result
=
new
ArrayList
<>(
versions
.
size
());
for
(
Version
version
:
versions
)
{
for
(
Version
version
:
versions
)
{
result
.
add
(
version
.
toDTO
());
VersionDTO
dto
=
EntityToDTOConverter
.
convert
(
version
);
result
.
add
(
dto
);
}
}
return
result
;
return
result
;
}
}
...
@@ -80,7 +83,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
...
@@ -80,7 +83,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
if
(
version
==
null
){
if
(
version
==
null
){
return
null
;
return
null
;
}
}
return
version
.
toDTO
();
VersionDTO
dto
=
EntityToDTOConverter
.
convert
(
version
);
return
dto
;
}
}
@Override
@Override
...
@@ -112,7 +116,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
...
@@ -112,7 +116,8 @@ public class AdminConfigServiceImpl implements AdminConfigService {
List
<
ConfigItemDTO
>
result
=
new
ArrayList
<>(
configItems
.
size
());
List
<
ConfigItemDTO
>
result
=
new
ArrayList
<>(
configItems
.
size
());
for
(
ConfigItem
configItem
:
configItems
)
{
for
(
ConfigItem
configItem
:
configItems
)
{
result
.
add
(
configItem
.
toDTO
());
ConfigItemDTO
dto
=
EntityToDTOConverter
.
convert
(
configItem
);
result
.
add
(
dto
);
}
}
return
result
;
return
result
;
}
}
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/impl/ConfigServiceImpl.java
浏览文件 @
9d19d637
...
@@ -2,7 +2,7 @@ package com.ctrip.apollo.biz.service.impl;
...
@@ -2,7 +2,7 @@ package com.ctrip.apollo.biz.service.impl;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
S
hot
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
s
hot
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.repository.ReleaseSnapShotRepository
;
import
com.ctrip.apollo.biz.repository.ReleaseSnapShotRepository
;
import
com.ctrip.apollo.biz.repository.VersionRepository
;
import
com.ctrip.apollo.biz.repository.VersionRepository
;
...
@@ -49,7 +49,7 @@ public class ConfigServiceImpl implements ConfigService {
...
@@ -49,7 +49,7 @@ public class ConfigServiceImpl implements ConfigService {
@Override
@Override
public
ApolloConfig
loadConfigByVersionAndClusterName
(
Version
version
,
String
clusterName
)
{
public
ApolloConfig
loadConfigByVersionAndClusterName
(
Version
version
,
String
clusterName
)
{
ReleaseSnap
S
hot
releaseSnapShot
=
ReleaseSnap
s
hot
releaseSnapShot
=
releaseSnapShotRepository
releaseSnapShotRepository
.
findByReleaseIdAndClusterName
(
version
.
getReleaseId
(),
clusterName
);
.
findByReleaseIdAndClusterName
(
version
.
getReleaseId
(),
clusterName
);
if
(
releaseSnapShot
==
null
)
{
if
(
releaseSnapShot
==
null
)
{
...
@@ -59,7 +59,7 @@ public class ConfigServiceImpl implements ConfigService {
...
@@ -59,7 +59,7 @@ public class ConfigServiceImpl implements ConfigService {
return
assembleConfig
(
version
,
releaseSnapShot
);
return
assembleConfig
(
version
,
releaseSnapShot
);
}
}
private
ApolloConfig
assembleConfig
(
Version
version
,
ReleaseSnap
S
hot
releaseSnapShot
)
{
private
ApolloConfig
assembleConfig
(
Version
version
,
ReleaseSnap
s
hot
releaseSnapShot
)
{
ApolloConfig
config
=
ApolloConfig
config
=
new
ApolloConfig
(
version
.
getAppId
(),
releaseSnapShot
.
getClusterName
(),
version
.
getName
(),
new
ApolloConfig
(
version
.
getAppId
(),
releaseSnapShot
.
getClusterName
(),
version
.
getName
(),
version
.
getReleaseId
());
version
.
getReleaseId
());
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/impl/ConfigServiceImplTest.java
浏览文件 @
9d19d637
...
@@ -2,7 +2,7 @@ package com.ctrip.apollo.biz.service.impl;
...
@@ -2,7 +2,7 @@ package com.ctrip.apollo.biz.service.impl;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
S
hot
;
import
com.ctrip.apollo.biz.entity.ReleaseSnap
s
hot
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.entity.Version
;
import
com.ctrip.apollo.biz.repository.ReleaseSnapShotRepository
;
import
com.ctrip.apollo.biz.repository.ReleaseSnapShotRepository
;
import
com.ctrip.apollo.biz.repository.VersionRepository
;
import
com.ctrip.apollo.biz.repository.VersionRepository
;
...
@@ -60,7 +60,7 @@ public class ConfigServiceImplTest {
...
@@ -60,7 +60,7 @@ public class ConfigServiceImplTest {
String
someValidConfiguration
=
"{\"apollo.bar\": \"foo\"}"
;
String
someValidConfiguration
=
"{\"apollo.bar\": \"foo\"}"
;
Version
someVersion
=
assembleVersion
(
someAppId
,
someVersionName
,
someReleaseId
);
Version
someVersion
=
assembleVersion
(
someAppId
,
someVersionName
,
someReleaseId
);
ReleaseSnap
S
hot
ReleaseSnap
s
hot
someReleaseSnapShot
=
someReleaseSnapShot
=
assembleReleaseSnapShot
(
someReleaseId
,
someClusterName
,
someValidConfiguration
);
assembleReleaseSnapShot
(
someReleaseId
,
someClusterName
,
someValidConfiguration
);
Map
<
String
,
Object
>
someMap
=
Maps
.
newHashMap
();
Map
<
String
,
Object
>
someMap
=
Maps
.
newHashMap
();
...
@@ -122,9 +122,9 @@ public class ConfigServiceImplTest {
...
@@ -122,9 +122,9 @@ public class ConfigServiceImplTest {
return
version
;
return
version
;
}
}
private
ReleaseSnap
S
hot
assembleReleaseSnapShot
(
long
releaseId
,
String
clusterName
,
private
ReleaseSnap
s
hot
assembleReleaseSnapShot
(
long
releaseId
,
String
clusterName
,
String
configurations
)
{
String
configurations
)
{
ReleaseSnap
Shot
releaseSnapShot
=
new
ReleaseSnapS
hot
();
ReleaseSnap
shot
releaseSnapShot
=
new
ReleaseSnaps
hot
();
releaseSnapShot
.
setReleaseId
(
releaseId
);
releaseSnapShot
.
setReleaseId
(
releaseId
);
releaseSnapShot
.
setClusterName
(
clusterName
);
releaseSnapShot
.
setClusterName
(
clusterName
);
releaseSnapShot
.
setConfigurations
(
configurations
);
releaseSnapShot
.
setConfigurations
(
configurations
);
...
...
pom.xml
浏览文件 @
9d19d637
...
@@ -40,10 +40,10 @@
...
@@ -40,10 +40,10 @@
<url>
https://travis-ci.org/ctripcorp/apollo
</url>
<url>
https://travis-ci.org/ctripcorp/apollo
</url>
</ciManagement>
</ciManagement>
<issueManagement>
<issueManagement>
<system>
github
</system>
<system>
github
</system>
<url>
https://github.com/ctripcorp/apollo/issues
</url>
<url>
https://github.com/ctripcorp/apollo/issues
</url>
</issueManagement>
</issueManagement>
<developers>
<developers>
<developer>
<developer>
...
@@ -77,14 +77,14 @@
...
@@ -77,14 +77,14 @@
</roles>
</roles>
</developer>
</developer>
</developers>
</developers>
<properties>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<github.global.server>
github
</github.global.server>
<github.global.server>
github
</github.global.server>
<github.global.oauth2Token>
${env.GITHUB_OAUTH_TOKEN}
</github.global.oauth2Token>
<github.global.oauth2Token>
${env.GITHUB_OAUTH_TOKEN}
</github.global.oauth2Token>
</properties>
</properties>
<modules>
<modules>
<module>
apollo-buildtools
</module>
<module>
apollo-buildtools
</module>
<module>
apollo-core
</module>
<module>
apollo-core
</module>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<module>
apollo-portal
</module>
<module>
apollo-portal
</module>
<module>
apollo-demo
</module>
<module>
apollo-demo
</module>
</modules>
</modules>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
@@ -154,7 +154,7 @@
...
@@ -154,7 +154,7 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<pluginManagement>
<pluginManagement>
<plugins>
<plugins>
...
@@ -217,22 +217,6 @@
...
@@ -217,22 +217,6 @@
</plugins>
</plugins>
</pluginManagement>
</pluginManagement>
<plugins>
<plugins>
<plugin>
<groupId>
com.github.github
</groupId>
<artifactId>
site-maven-plugin
</artifactId>
<version>
0.12
</version>
<configuration>
<message>
Building site for ${project.version}
</message>
</configuration>
<executions>
<execution>
<goals>
<goal>
site
</goal>
</goals>
<phase>
site
</phase>
</execution>
</executions>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
...
@@ -243,7 +227,7 @@
...
@@ -243,7 +227,7 @@
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<profiles>
<profiles>
<profile>
<profile>
<id>
travis
</id>
<id>
travis
</id>
...
@@ -255,6 +239,22 @@
...
@@ -255,6 +239,22 @@
</activation>
</activation>
<build>
<build>
<plugins>
<plugins>
<plugin>
<groupId>
com.github.github
</groupId>
<artifactId>
site-maven-plugin
</artifactId>
<version>
0.12
</version>
<configuration>
<message>
Building site for ${project.version}
</message>
</configuration>
<executions>
<execution>
<goals>
<goal>
site
</goal>
</goals>
<phase>
site
</phase>
</execution>
</executions>
</plugin>
<plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
cobertura-maven-plugin
</artifactId>
<artifactId>
cobertura-maven-plugin
</artifactId>
...
@@ -285,7 +285,7 @@
...
@@ -285,7 +285,7 @@
</snapshots>
</snapshots>
</repository>
</repository>
</repositories>
</repositories>
<reporting>
<reporting>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录