Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
186b1b6c
apollo
项目概览
wrr-cat
/
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,体验更适合开发者的 AI 搜索 >>
提交
186b1b6c
编写于
5月 24, 2016
作者:
L
lepdou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
portal add db config
上级
25517ac3
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
117 addition
and
27 deletion
+117
-27
apollo-biz/pom.xml
apollo-biz/pom.xml
+1
-9
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/App.java
.../main/java/com/ctrip/framework/apollo/biz/entity/App.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
...a/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java
...ain/java/com/ctrip/framework/apollo/biz/entity/Audit.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
...n/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java
...in/java/com/ctrip/framework/apollo/biz/entity/Commit.java
+3
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java
...main/java/com/ctrip/framework/apollo/biz/entity/Item.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java
...java/com/ctrip/framework/apollo/biz/entity/Namespace.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java
...java/com/ctrip/framework/apollo/biz/entity/Privilege.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java
...n/java/com/ctrip/framework/apollo/biz/entity/Release.java
+2
-0
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
...a/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
+2
-0
apollo-common/pom.xml
apollo-common/pom.xml
+9
-0
apollo-common/src/main/java/com/ctrip/framework/apollo/common/entity/BaseEntity.java
.../com/ctrip/framework/apollo/common/entity/BaseEntity.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalAppController.java
...amework/apollo/portal/controller/PortalAppController.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalConfigController.java
...work/apollo/portal/controller/PortalConfigController.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalNamespaceController.java
...k/apollo/portal/controller/PortalNamespaceController.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/NamespaceSyncModel.java
...amework/apollo/portal/entity/form/NamespaceSyncModel.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java
...ctrip/framework/apollo/portal/entity/po/ServerConfig.java
+56
-0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/EnvClusterInfo.java
...rip/framework/apollo/portal/entity/vo/EnvClusterInfo.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/ItemDiffs.java
...om/ctrip/framework/apollo/portal/entity/vo/ItemDiffs.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/NamespaceIdentifer.java
...framework/apollo/portal/entity/vo/NamespaceIdentifer.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/vo/NamespaceVO.java
.../ctrip/framework/apollo/portal/entity/vo/NamespaceVO.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/repository/ServerConfigRepository.java
...work/apollo/portal/repository/ServerConfigRepository.java
+13
-0
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalAppService.java
...rip/framework/apollo/portal/service/PortalAppService.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalConfigService.java
.../framework/apollo/portal/service/PortalConfigService.java
+2
-2
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalNamespaceService.java
...amework/apollo/portal/service/PortalNamespaceService.java
+1
-1
apollo-portal/src/main/resources/portal.properties
apollo-portal/src/main/resources/portal.properties
+1
-1
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/ConfigServiceTest.java
.../com/ctrip/framework/apollo/portal/ConfigServiceTest.java
+2
-2
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/NamespaceServiceTest.java
...m/ctrip/framework/apollo/portal/NamespaceServiceTest.java
+1
-1
未找到文件。
apollo-biz/pom.xml
浏览文件 @
186b1b6c
...
...
@@ -24,14 +24,6 @@
<artifactId>
spring-cloud-starter-eureka
</artifactId>
</dependency>
<!-- end of eureka -->
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/App.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
...
...
@@ -11,7 +13,7 @@ import javax.persistence.Table;
@Table
(
name
=
"commit"
)
@SQLDelete
(
sql
=
"Update commit set isDeleted = 1 where id = ?"
)
@Where
(
clause
=
"isDeleted = 0"
)
public
class
Commit
extends
BaseEntity
{
public
class
Commit
extends
BaseEntity
{
@Column
(
name
=
"ChangeSets"
,
nullable
=
false
)
private
String
changeSets
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.biz.entity
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
...
...
apollo-common/pom.xml
浏览文件 @
186b1b6c
...
...
@@ -38,6 +38,15 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-commons
</artifactId>
...
...
apollo-
biz/src/main/java/com/ctrip/framework/apollo/biz
/entity/BaseEntity.java
→
apollo-
common/src/main/java/com/ctrip/framework/apollo/common
/entity/BaseEntity.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.
biz
.entity
;
package
com.ctrip.framework.apollo.
common
.entity
;
import
java.util.Date
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalAppController.java
浏览文件 @
186b1b6c
...
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
import
com.ctrip.framework.apollo.core.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.entity.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.service.PortalAppService
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalConfigController.java
浏览文件 @
186b1b6c
...
...
@@ -6,7 +6,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
import
com.ctrip.framework.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.framework.apollo.core.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceSyncModel
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceReleaseModel
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalNamespaceController.java
浏览文件 @
186b1b6c
...
...
@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.core.dto.NamespaceDTO;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceVO
;
import
com.ctrip.framework.apollo.portal.service.PortalNamespaceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/NamespaceSyncModel.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity.form
;
import
com.ctrip.framework.apollo.core.dto.ItemDTO
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceIdentifer
;
import
org.springframework.util.CollectionUtils
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/po/ServerConfig.java
0 → 100644
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity.po
;
import
com.ctrip.framework.apollo.common.entity.BaseEntity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
/**
* @author Jason Song(song_s@ctrip.com)
*/
@Entity
@Table
(
name
=
"ServerConfig"
)
@SQLDelete
(
sql
=
"Update ServerConfig set isDeleted = 1 where id = ?"
)
@Where
(
clause
=
"isDeleted = 0"
)
public
class
ServerConfig
extends
BaseEntity
{
@Column
(
name
=
"Key"
,
nullable
=
false
)
private
String
key
;
@Column
(
name
=
"Value"
,
nullable
=
false
)
private
String
value
;
@Column
(
name
=
"Comment"
,
nullable
=
false
)
private
String
comment
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
public
String
toString
()
{
return
toStringHelper
().
add
(
"key"
,
key
).
add
(
"value"
,
value
).
add
(
"comment"
,
comment
).
toString
();
}
}
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/EnvClusterInfo.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/
vo/
EnvClusterInfo.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity
;
package
com.ctrip.framework.apollo.portal.entity
.vo
;
import
com.ctrip.framework.apollo.core.dto.ClusterDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/ItemDiffs.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/
vo/
ItemDiffs.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity
;
package
com.ctrip.framework.apollo.portal.entity
.vo
;
import
com.ctrip.framework.apollo.core.dto.ItemChangeSets
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/NamespaceIdentifer.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/
vo/
NamespaceIdentifer.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity
;
package
com.ctrip.framework.apollo.portal.entity
.vo
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/NamespaceVO.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/
vo/
NamespaceVO.java
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.entity
;
package
com.ctrip.framework.apollo.portal.entity
.vo
;
import
com.ctrip.framework.apollo.core.dto.ItemDTO
;
import
com.ctrip.framework.apollo.core.dto.NamespaceDTO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/repository/ServerConfigRepository.java
0 → 100644
浏览文件 @
186b1b6c
package
com.ctrip.framework.apollo.portal.repository
;
import
com.ctrip.framework.apollo.portal.entity.po.ServerConfig
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
/**
* @author Jason Song(song_s@ctrip.com)
*/
public
interface
ServerConfigRepository
extends
PagingAndSortingRepository
<
ServerConfig
,
Long
>
{
ServerConfig
findByKey
(
String
key
);
}
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalAppService.java
浏览文件 @
186b1b6c
...
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.core.exception.BadRequestException;
import
com.ctrip.framework.apollo.core.exception.ServiceException
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
EnvClusterInfo
;
@Service
public
class
PortalAppService
{
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalConfigService.java
浏览文件 @
186b1b6c
...
...
@@ -18,8 +18,8 @@ import com.ctrip.framework.apollo.core.exception.BadRequestException;
import
com.ctrip.framework.apollo.core.exception.NotFoundException
;
import
com.ctrip.framework.apollo.core.exception.ServiceException
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceIdentifer
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.service.txtresolver.ConfigTextResolver
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalNamespaceService.java
浏览文件 @
186b1b6c
...
...
@@ -11,7 +11,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceVO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-portal/src/main/resources/portal.properties
浏览文件 @
186b1b6c
spring.application.name
=
apollo-portal
apollo.portal.env
=
fat,uat
,pro
apollo.portal.env
=
fat,uat
ctrip.appid
=
100003173
server.port
=
8070
logging.file
=
/opt/logs/100003173/apollo-portal.log
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/ConfigServiceTest.java
浏览文件 @
186b1b6c
...
...
@@ -6,8 +6,8 @@ import com.ctrip.framework.apollo.core.dto.ItemDTO;
import
com.ctrip.framework.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceIdentifer
;
import
com.ctrip.framework.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.service.PortalConfigService
;
import
com.ctrip.framework.apollo.portal.service.txtresolver.PropertyResolver
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/NamespaceServiceTest.java
浏览文件 @
186b1b6c
...
...
@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.core.dto.NamespaceDTO;
import
com.ctrip.framework.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.framework.apollo.portal.entity.
vo.
NamespaceVO
;
import
com.ctrip.framework.apollo.portal.service.PortalNamespaceService
;
import
com.ctrip.framework.apollo.portal.service.txtresolver.PropertyResolver
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录