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
282e94d9
Commit
282e94d9
authored
Nov 29, 2016
by
Jason Song
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #463 from lepdou/email
refactor portal package structure
parents
1f6d2cdc
d121abf3
Hide whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
108 additions
and
108 deletions
+108
-108
AppController.java
...framework/apollo/openapi/v1/controller/AppController.java
+1
-1
ItemController.java
...ramework/apollo/openapi/v1/controller/ItemController.java
+1
-1
ReleaseController.java
...ework/apollo/openapi/v1/controller/ReleaseController.java
+1
-1
API.java
.../main/java/com/ctrip/framework/apollo/portal/api/API.java
+3
-1
AdminServiceAddressLocator.java
.../apollo/portal/components/AdminServiceAddressLocator.java
+1
-2
PermissionValidator.java
...amework/apollo/portal/components/PermissionValidator.java
+2
-1
PortalSettings.java
...ip/framework/apollo/portal/components/PortalSettings.java
+2
-2
RestTemplateFactory.java
...amework/apollo/portal/components/RestTemplateFactory.java
+1
-1
RetryableRestTemplate.java
...ework/apollo/portal/components/RetryableRestTemplate.java
+1
-1
ConfigTextResolver.java
...llo/portal/components/txtresolver/ConfigTextResolver.java
+2
-2
FileTextResolver.java
...pollo/portal/components/txtresolver/FileTextResolver.java
+1
-1
PropertyResolver.java
...pollo/portal/components/txtresolver/PropertyResolver.java
+1
-1
AppController.java
...rip/framework/apollo/portal/controller/AppController.java
+2
-2
ClusterController.java
...framework/apollo/portal/controller/ClusterController.java
+1
-1
ConsumerController.java
...ramework/apollo/portal/controller/ConsumerController.java
+1
-1
EnvController.java
...rip/framework/apollo/portal/controller/EnvController.java
+1
-1
ItemController.java
...ip/framework/apollo/portal/controller/ItemController.java
+1
-1
NamespaceBranchController.java
...k/apollo/portal/controller/NamespaceBranchController.java
+1
-1
NamespaceController.java
...amework/apollo/portal/controller/NamespaceController.java
+1
-1
PermissionController.java
...mework/apollo/portal/controller/PermissionController.java
+2
-2
ServerConfigController.java
...work/apollo/portal/controller/ServerConfigController.java
+1
-1
SsoHeartbeatController.java
...work/apollo/portal/controller/SsoHeartbeatController.java
+1
-1
UserInfoController.java
...ramework/apollo/portal/controller/UserInfoController.java
+3
-3
package-info.java
...ctrip/framework/apollo/portal/customize/package-info.java
+0
-4
LogoutHandler.java
...m/ctrip/framework/apollo/portal/extend/LogoutHandler.java
+1
-1
SsoHeartbeatHandler.java
...p/framework/apollo/portal/extend/SsoHeartbeatHandler.java
+1
-1
UserInfoHolder.java
.../ctrip/framework/apollo/portal/extend/UserInfoHolder.java
+3
-2
UserService.java
...com/ctrip/framework/apollo/portal/extend/UserService.java
+1
-1
AuthConfiguration.java
...apollo/portal/extend/configuration/AuthConfiguration.java
+14
-18
BizLoggingCustomizer.java
...work/apollo/portal/extend/ctrip/BizLoggingCustomizer.java
+1
-1
CtripLogoutHandler.java
...mework/apollo/portal/extend/ctrip/CtripLogoutHandler.java
+2
-2
CtripSsoHeartbeatHandler.java
.../apollo/portal/extend/ctrip/CtripSsoHeartbeatHandler.java
+2
-2
CtripUserInfoHolder.java
...ework/apollo/portal/extend/ctrip/CtripUserInfoHolder.java
+2
-2
CtripUserService.java
...ramework/apollo/portal/extend/ctrip/CtripUserService.java
+2
-2
WebContextConfiguration.java
...k/apollo/portal/extend/ctrip/WebContextConfiguration.java
+3
-3
RecordAccessUserFilter.java
...o/portal/extend/ctrip/filters/RecordAccessUserFilter.java
+2
-2
DefaultLogoutHandler.java
...pollo/portal/extend/defaultimpl/DefaultLogoutHandler.java
+2
-2
DefaultSsoHeartbeatHandler.java
...portal/extend/defaultimpl/DefaultSsoHeartbeatHandler.java
+2
-2
DefaultUserInfoHolder.java
...ollo/portal/extend/defaultimpl/DefaultUserInfoHolder.java
+2
-2
DefaultUserService.java
.../apollo/portal/extend/defaultimpl/DefaultUserService.java
+2
-2
package-info.java
...om/ctrip/framework/apollo/portal/extend/package-info.java
+7
-0
CreationListener.java
...ip/framework/apollo/portal/listener/CreationListener.java
+1
-1
AppNamespaceService.java
.../framework/apollo/portal/service/AppNamespaceService.java
+1
-1
AppService.java
...com/ctrip/framework/apollo/portal/service/AppService.java
+1
-1
ClusterService.java
...ctrip/framework/apollo/portal/service/ClusterService.java
+1
-1
FavoriteService.java
...trip/framework/apollo/portal/service/FavoriteService.java
+2
-1
ItemService.java
...om/ctrip/framework/apollo/portal/service/ItemService.java
+2
-2
NamespaceBranchService.java
...amework/apollo/portal/service/NamespaceBranchService.java
+2
-2
NamespaceService.java
...rip/framework/apollo/portal/service/NamespaceService.java
+1
-1
ReleaseService.java
...ctrip/framework/apollo/portal/service/ReleaseService.java
+1
-1
RoleInitializationService.java
...work/apollo/portal/service/RoleInitializationService.java
+1
-1
AllTests.java
...test/java/com/ctrip/framework/apollo/portal/AllTests.java
+2
-2
RetryableRestTemplateTest.java
...ip/framework/apollo/portal/RetryableRestTemplateTest.java
+2
-2
ServiceExceptionTest.java
...m/ctrip/framework/apollo/portal/ServiceExceptionTest.java
+1
-1
FileTextResolverTest.java
...o/portal/components/txtresolver/FileTextResolverTest.java
+1
-1
PropertyResolverTest.java
...o/portal/components/txtresolver/PropertyResolverTest.java
+1
-1
ConsumerControllerTest.java
...work/apollo/portal/controller/ConsumerControllerTest.java
+2
-3
CtripUserServiceTest.java
...work/apollo/portal/extend/ctrip/CtripUserServiceTest.java
+1
-2
ConfigServiceTest.java
...ip/framework/apollo/portal/service/ConfigServiceTest.java
+2
-2
NamespaceServiceTest.java
...framework/apollo/portal/service/NamespaceServiceTest.java
+1
-1
RoleInitializationServiceTest.java
.../apollo/portal/service/RoleInitializationServiceTest.java
+1
-2
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/AppController.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.
components.
PortalSettings
;
import
com.ctrip.framework.apollo.portal.service.ClusterService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java
View file @
282e94d9
...
...
@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.core.utils.StringUtils;
import
com.ctrip.framework.apollo.openapi.dto.OpenItemDTO
;
import
com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils
;
import
com.ctrip.framework.apollo.portal.service.ItemService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ReleaseController.java
View file @
282e94d9
...
...
@@ -10,7 +10,7 @@ import com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO;
import
com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.service.ReleaseService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/API.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
import
com.ctrip.framework.apollo.portal.components.RetryableRestTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
public
class
API
{
public
abstract
class
API
{
@Autowired
protected
RetryableRestTemplate
restTemplate
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
api
/AdminServiceAddressLocator.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/AdminServiceAddressLocator.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
;
import
com.google.common.collect.Lists
;
import
com.ctrip.framework.apollo.core.MetaDomainConsts
;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/PermissionValidator.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/PermissionValidator.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
;
import
com.ctrip.framework.apollo.common.entity.AppNamespace
;
import
com.ctrip.framework.apollo.portal.constant.PermissionType
;
import
com.ctrip.framework.apollo.portal.extend.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.service.RolePermissionService
;
import
com.ctrip.framework.apollo.portal.util.RoleUtils
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/PortalSettings.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components/
PortalSettings.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
;
import
com.ctrip.framework.apollo.core.enums.Env
;
...
...
@@ -80,7 +80,7 @@ public class PortalSettings {
return
activeEnvs
;
}
class
HealthCheckTask
implements
Runnable
{
private
class
HealthCheckTask
implements
Runnable
{
private
static
final
int
ENV_DOWN_THRESHOLD
=
2
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
api
/RestTemplateFactory.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/RestTemplateFactory.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
;
import
com.google.common.io.BaseEncoding
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
api
/RetryableRestTemplate.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/RetryableRestTemplate.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
service
/txtresolver/ConfigTextResolver.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/txtresolver/ConfigTextResolver.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
.
txtresolver
;
import
com.ctrip.framework.apollo.common.dto.ItemChangeSets
;
import
com.ctrip.framework.apollo.common.dto.ItemDTO
;
...
...
@@ -6,7 +6,7 @@ import com.ctrip.framework.apollo.common.dto.ItemDTO;
import
java.util.List
;
/**
* users can modify config in text mode.so need
updateConfigItemByText
text.
* users can modify config in text mode.so need
resolve
text.
*/
public
interface
ConfigTextResolver
{
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
service
/txtresolver/FileTextResolver.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/txtresolver/FileTextResolver.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
.
txtresolver
;
import
com.ctrip.framework.apollo.common.dto.ItemChangeSets
;
import
com.ctrip.framework.apollo.common.dto.ItemDTO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
service
/txtresolver/PropertyResolver.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
components
/txtresolver/PropertyResolver.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
.
txtresolver
;
import
com.ctrip.framework.apollo.common.dto.ItemChangeSets
;
import
com.ctrip.framework.apollo.common.dto.ItemDTO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java
View file @
282e94d9
...
...
@@ -10,12 +10,12 @@ import com.ctrip.framework.apollo.common.http.RichResponseEntity;
import
com.ctrip.framework.apollo.common.utils.InputValidator
;
import
com.ctrip.framework.apollo.common.utils.RequestPrecondition
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.
components.
PortalSettings
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.listener.AppCreationEvent
;
import
com.ctrip.framework.apollo.portal.service.AppService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ClusterController.java
View file @
282e94d9
...
...
@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import
com.ctrip.framework.apollo.common.utils.InputValidator
;
import
com.ctrip.framework.apollo.common.utils.RequestPrecondition
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.service.ClusterService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ConsumerController.java
View file @
282e94d9
...
...
@@ -2,7 +2,7 @@ package com.ctrip.framework.apollo.portal.controller;
import
com.ctrip.framework.apollo.openapi.entity.ConsumerToken
;
import
com.ctrip.framework.apollo.openapi.service.ConsumerService
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/EnvController.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.
components.
PortalSettings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ItemController.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ItemDTO;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceSyncModel
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/NamespaceBranchController.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.GrayReleaseRuleDTO;
import
com.ctrip.framework.apollo.common.dto.NamespaceDTO
;
import
com.ctrip.framework.apollo.common.dto.ReleaseDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.
auth
.PermissionValidator
;
import
com.ctrip.framework.apollo.portal.
components
.PermissionValidator
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO
;
import
com.ctrip.framework.apollo.portal.service.NamespaceBranchService
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/NamespaceController.java
View file @
282e94d9
...
...
@@ -11,7 +11,7 @@ import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import
com.ctrip.framework.apollo.core.enums.ConfigFileFormat
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceCreationModel
;
import
com.ctrip.framework.apollo.portal.constant.RoleType
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java
View file @
282e94d9
...
...
@@ -4,14 +4,14 @@ import com.google.common.collect.Sets;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.common.utils.RequestPrecondition
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.RoleType
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.vo.AppRolesAssignedUsers
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceRolesAssignedUsers
;
import
com.ctrip.framework.apollo.portal.entity.vo.PermissionCondition
;
import
com.ctrip.framework.apollo.portal.service.RolePermissionService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
com.ctrip.framework.apollo.portal.util.RoleUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ServerConfigController.java
View file @
282e94d9
...
...
@@ -3,7 +3,7 @@ package com.ctrip.framework.apollo.portal.controller;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.common.utils.RequestPrecondition
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.ServerConfig
;
import
com.ctrip.framework.apollo.portal.repository.ServerConfigRepository
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SsoHeartbeatController.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.framework.apollo.portal.
auth
.SsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.SsoHeartbeatHandler
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/UserInfoController.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.framework.apollo.portal.
auth
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/customize/package-info.java
deleted
100644 → 0
View file @
1f6d2cdc
/**
* 携程内部的日志系统,第三方公司可删除
*/
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
customize
;
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/LogoutHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/LogoutHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/SsoHeartbeatHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/SsoHeartbeatHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/UserInfoHolder.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/UserInfoHolder.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
/**
* 获取登录用户的信息,不同的公司应该有不同的实现
* Get access to the user's information,
* different companies should have a different implementation
*/
public
interface
UserInfoHolder
{
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
service
/UserService.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/UserService.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/configuration/AuthConfiguration.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend/
configuration/AuthConfiguration.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
configuration
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
configuration
;
import
com.google.common.collect.Maps
;
import
com.ctrip.framework.apollo.openapi.filter.ConsumerAuthenticationFilter
;
import
com.ctrip.framework.apollo.openapi.util.ConsumerAuditUtil
;
import
com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil
;
import
com.ctrip.framework.apollo.portal.
auth
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.SsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
auth
.ctrip.CtripLogoutHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.ctrip.CtripSsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.ctrip.CtripUserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
auth
.ctrip.CtripUserService
;
import
com.ctrip.framework.apollo.portal.
auth
.defaultimpl.DefaultLogoutHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.defaultimpl.DefaultSsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
auth
.defaultimpl.DefaultUserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
auth
.defaultimpl.DefaultUserService
;
import
com.ctrip.framework.apollo.portal.
extend
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.SsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.ctrip.CtripLogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.ctrip.CtripSsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.ctrip.CtripUserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.ctrip.CtripUserService
;
import
com.ctrip.framework.apollo.portal.
extend
.defaultimpl.DefaultLogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.defaultimpl.DefaultSsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.defaultimpl.DefaultUserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.defaultimpl.DefaultUserService
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
...
...
@@ -33,15 +33,11 @@ import java.util.Map;
import
javax.servlet.Filter
;
/**
* sso相关的配置.
*/
@Configuration
public
class
AuthConfiguration
{
/**
* 在ctrip内部运行时,会指定 spring.profiles.active = ctrip.
* ctrip sso是通过cas实现的,所以需要加载相关的filter和listener.
* spring.profiles.active = ctrip
*/
@Configuration
@Profile
(
"ctrip"
)
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
customize
/BizLoggingCustomizer.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend/ctrip
/BizLoggingCustomizer.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
customize
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.ctrip.framework.apollo.common.customize.LoggingCustomizer
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/ctrip/CtripLogoutHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/ctrip/CtripLogoutHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
ctrip
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.ctrip.framework.apollo.portal.
auth
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/ctrip/CtripSsoHeartbeatHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/ctrip/CtripSsoHeartbeatHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
ctrip
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.ctrip.framework.apollo.portal.
auth
.SsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.SsoHeartbeatHandler
;
import
java.io.IOException
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/ctrip/CtripUserInfoHolder.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/ctrip/CtripUserInfoHolder.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
ctrip
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
java.lang.reflect.Method
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/ctrip/CtripUserService.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/ctrip/CtripUserService.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
ctrip
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
...
...
@@ -6,7 +6,7 @@ import com.google.common.collect.Maps;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
org.springframework.core.ParameterizedTypeReference
;
import
org.springframework.http.HttpEntity
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
configuration
/WebContextConfiguration.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend/ctrip
/WebContextConfiguration.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
configuration
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.google.common.base.Strings
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.filters.RecordAccessUserFilter
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend.ctrip.
filters.RecordAccessUserFilter
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/filters/RecordAccessUserFilter.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend/ctrip/
filters/RecordAccessUserFilter.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
filters
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
.
filters
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.dianping.cat.Cat
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/defaultimpl/DefaultLogoutHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/defaultimpl/DefaultLogoutHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
defaultimpl
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
defaultimpl
;
import
com.ctrip.framework.apollo.portal.
auth
.LogoutHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.LogoutHandler
;
import
java.io.IOException
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/defaultimpl/DefaultSsoHeartbeatHandler.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/defaultimpl/DefaultSsoHeartbeatHandler.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
defaultimpl
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
defaultimpl
;
import
com.ctrip.framework.apollo.portal.
auth
.SsoHeartbeatHandler
;
import
com.ctrip.framework.apollo.portal.
extend
.SsoHeartbeatHandler
;
import
java.io.IOException
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/defaultimpl/DefaultUserInfoHolder.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/defaultimpl/DefaultUserInfoHolder.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
defaultimpl
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
defaultimpl
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
/**
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
auth
/defaultimpl/DefaultUserService.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/
extend
/defaultimpl/DefaultUserService.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
defaultimpl
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
defaultimpl
;
import
com.google.common.collect.Lists
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/extend/package-info.java
0 → 100644
View file @
282e94d9
/**
* The interfaces under the extend package, each company should own to implement.
* Other companies can ignore the implementation under the Ctrip package.
* In addition, we provide the default implementation of the interface under the default package.
*
*/
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
;
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/listener/CreationListener.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.AppDTO;
import
com.ctrip.framework.apollo.common.dto.AppNamespaceDTO
;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.PortalSettings
;
import
com.ctrip.framework.apollo.portal.
components.
PortalSettings
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.dianping.cat.Cat
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/AppNamespaceService.java
View file @
282e94d9
...
...
@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.core.ConfigConsts
;
import
com.ctrip.framework.apollo.core.enums.ConfigFileFormat
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.repository.AppNamespaceRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/AppService.java
View file @
282e94d9
...
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.utils.BeanUtils;
import
com.ctrip.framework.apollo.common.utils.ExceptionUtils
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.repository.AppRepository
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ClusterService.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.dianping.cat.Cat
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/FavoriteService.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.portal.auth.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.extend.UserService
;
import
com.ctrip.framework.apollo.portal.extend.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.Favorite
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.repository.FavoriteRepository
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ItemService.java
View file @
282e94d9
...
...
@@ -10,12 +10,12 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier
;
import
com.ctrip.framework.apollo.portal.
service
.txtresolver.ConfigTextResolver
;
import
com.ctrip.framework.apollo.portal.
components
.txtresolver.ConfigTextResolver
;
import
com.dianping.cat.Cat
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/NamespaceBranchService.java
View file @
282e94d9
...
...
@@ -8,8 +8,8 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.PermissionValidator
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
components
.PermissionValidator
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.components.ItemsComparator
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/NamespaceService.java
View file @
282e94d9
...
...
@@ -13,7 +13,7 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO
;
import
com.dianping.cat.Cat
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ReleaseService.java
View file @
282e94d9
...
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.CatEventType
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.entity.vo.KVEntity
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/RoleInitializationService.java
View file @
282e94d9
...
...
@@ -6,7 +6,7 @@ import com.google.common.collect.Sets;
import
com.ctrip.framework.apollo.common.entity.App
;
import
com.ctrip.framework.apollo.core.ConfigConsts
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.PermissionType
;
import
com.ctrip.framework.apollo.portal.constant.RoleType
;
import
com.ctrip.framework.apollo.portal.entity.po.Permission
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AllTests.java
View file @
282e94d9
...
...
@@ -12,8 +12,8 @@ import com.ctrip.framework.apollo.portal.service.ConfigServiceTest;
import
com.ctrip.framework.apollo.portal.service.NamespaceServiceTest
;
import
com.ctrip.framework.apollo.portal.service.RoleInitializationServiceTest
;
import
com.ctrip.framework.apollo.portal.service.RolePermissionServiceTest
;
import
com.ctrip.framework.apollo.portal.
service
.txtresolver.FileTextResolverTest
;
import
com.ctrip.framework.apollo.portal.
service
.txtresolver.PropertyResolverTest
;
import
com.ctrip.framework.apollo.portal.
components
.txtresolver.FileTextResolverTest
;
import
com.ctrip.framework.apollo.portal.
components
.txtresolver.PropertyResolverTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/RetryableRestTemplateTest.java
View file @
282e94d9
...
...
@@ -3,8 +3,8 @@ package com.ctrip.framework.apollo.portal;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.portal.
api
.AdminServiceAddressLocator
;
import
com.ctrip.framework.apollo.portal.
api
.RetryableRestTemplate
;
import
com.ctrip.framework.apollo.portal.
components
.AdminServiceAddressLocator
;
import
com.ctrip.framework.apollo.portal.
components
.RetryableRestTemplate
;
import
org.apache.http.HttpHost
;
import
org.apache.http.conn.ConnectTimeoutException
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/ServiceExceptionTest.java
View file @
282e94d9
...
...
@@ -21,7 +21,7 @@ import org.springframework.web.client.HttpStatusCodeException;
import
com.ctrip.framework.apollo.common.entity.App
;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.portal.controller.AppController
;
import
com.ctrip.framework.apollo.portal.
service
.UserService
;
import
com.ctrip.framework.apollo.portal.
extend
.UserService
;
import
com.google.gson.Gson
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
service
/txtresolver/FileTextResolverTest.java
→
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
components
/txtresolver/FileTextResolverTest.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
.
txtresolver
;
import
com.ctrip.framework.apollo.core.ConfigConsts
;
import
com.ctrip.framework.apollo.common.dto.ItemChangeSets
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
service
/txtresolver/PropertyResolverTest.java
→
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
components
/txtresolver/PropertyResolverTest.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
components
.
txtresolver
;
import
com.ctrip.framework.apollo.common.dto.ItemChangeSets
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/ConsumerControllerTest.java
View file @
282e94d9
...
...
@@ -2,7 +2,7 @@ package com.ctrip.framework.apollo.portal.controller;
import
com.ctrip.framework.apollo.openapi.entity.ConsumerToken
;
import
com.ctrip.framework.apollo.openapi.service.ConsumerService
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
org.junit.Before
;
...
...
@@ -56,4 +56,4 @@ public class ConsumerControllerTest {
verify
(
consumerService
,
times
(
1
)).
createConsumerToken
(
any
(
ConsumerToken
.
class
));
}
}
\ No newline at end of file
}
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
auth
/ctrip/CtripUserServiceTest.java
→
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/
extend
/ctrip/CtripUserServiceTest.java
View file @
282e94d9
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
auth
.
ctrip
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
extend
.
ctrip
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
import
com.ctrip.framework.apollo.portal.AbstractUnitTest
;
import
com.ctrip.framework.apollo.portal.auth.ctrip.CtripUserService
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.service.ServerConfigService
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/service/ConfigServiceTest.java
View file @
282e94d9
...
...
@@ -7,12 +7,12 @@ import com.ctrip.framework.apollo.common.dto.NamespaceDTO;
import
com.ctrip.framework.apollo.core.enums.ConfigFileFormat
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.entity.po.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.
service
.txtresolver.PropertyResolver
;
import
com.ctrip.framework.apollo.portal.
components
.txtresolver.PropertyResolver
;
import
org.junit.Assert
;
import
org.junit.Before
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/service/NamespaceServiceTest.java
View file @
282e94d9
...
...
@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO
;
import
com.ctrip.framework.apollo.portal.
service
.txtresolver.PropertyResolver
;
import
com.ctrip.framework.apollo.portal.
components
.txtresolver.PropertyResolver
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/service/RoleInitializationServiceTest.java
View file @
282e94d9
...
...
@@ -4,7 +4,7 @@ import com.google.common.collect.Sets;
import
com.ctrip.framework.apollo.common.entity.App
;
import
com.ctrip.framework.apollo.portal.AbstractUnitTest
;
import
com.ctrip.framework.apollo.portal.
auth
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.
extend
.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.constant.PermissionType
;
import
com.ctrip.framework.apollo.portal.entity.po.Permission
;
import
com.ctrip.framework.apollo.portal.entity.po.Role
;
...
...
@@ -16,7 +16,6 @@ import org.mockito.InjectMocks;
import
org.mockito.Mock
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Matchers
.
anySet
;
import
static
org
.
mockito
.
Matchers
.
anySetOf
;
import
static
org
.
mockito
.
Matchers
.
anyString
;
import
static
org
.
mockito
.
Mockito
.
times
;
...
...
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