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
186b1b6c
Commit
186b1b6c
authored
May 24, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portal add db config
parent
25517ac3
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
117 additions
and
27 deletions
+117
-27
pom.xml
apollo-biz/pom.xml
+1
-9
App.java
.../main/java/com/ctrip/framework/apollo/biz/entity/App.java
+2
-0
AppNamespace.java
...a/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
+2
-0
Audit.java
...ain/java/com/ctrip/framework/apollo/biz/entity/Audit.java
+2
-0
Cluster.java
...n/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
+2
-0
Commit.java
...in/java/com/ctrip/framework/apollo/biz/entity/Commit.java
+3
-1
Item.java
...main/java/com/ctrip/framework/apollo/biz/entity/Item.java
+2
-0
Namespace.java
...java/com/ctrip/framework/apollo/biz/entity/Namespace.java
+2
-0
Privilege.java
...java/com/ctrip/framework/apollo/biz/entity/Privilege.java
+2
-0
Release.java
...n/java/com/ctrip/framework/apollo/biz/entity/Release.java
+2
-0
ServerConfig.java
...a/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
+2
-0
pom.xml
apollo-common/pom.xml
+9
-0
BaseEntity.java
.../com/ctrip/framework/apollo/common/entity/BaseEntity.java
+1
-1
PortalAppController.java
...amework/apollo/portal/controller/PortalAppController.java
+1
-1
PortalConfigController.java
...work/apollo/portal/controller/PortalConfigController.java
+1
-1
PortalNamespaceController.java
...k/apollo/portal/controller/PortalNamespaceController.java
+1
-1
NamespaceSyncModel.java
...amework/apollo/portal/entity/form/NamespaceSyncModel.java
+1
-1
ServerConfig.java
...ctrip/framework/apollo/portal/entity/po/ServerConfig.java
+56
-0
EnvClusterInfo.java
...rip/framework/apollo/portal/entity/vo/EnvClusterInfo.java
+1
-1
ItemDiffs.java
...om/ctrip/framework/apollo/portal/entity/vo/ItemDiffs.java
+1
-1
NamespaceIdentifer.java
...framework/apollo/portal/entity/vo/NamespaceIdentifer.java
+1
-1
NamespaceVO.java
.../ctrip/framework/apollo/portal/entity/vo/NamespaceVO.java
+1
-1
ServerConfigRepository.java
...work/apollo/portal/repository/ServerConfigRepository.java
+13
-0
PortalAppService.java
...rip/framework/apollo/portal/service/PortalAppService.java
+1
-1
PortalConfigService.java
.../framework/apollo/portal/service/PortalConfigService.java
+2
-2
PortalNamespaceService.java
...amework/apollo/portal/service/PortalNamespaceService.java
+1
-1
portal.properties
apollo-portal/src/main/resources/portal.properties
+1
-1
ConfigServiceTest.java
.../com/ctrip/framework/apollo/portal/ConfigServiceTest.java
+2
-2
NamespaceServiceTest.java
...m/ctrip/framework/apollo/portal/NamespaceServiceTest.java
+1
-1
No files found.
apollo-biz/pom.xml
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
186b1b6c
...
...
@@ -39,6 +39,15 @@
<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>
</dependency>
...
...
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
;
...
...
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