Skip to content

Commit 282e94d

Browse files
authored
Merge pull request apolloconfig#463 from lepdou/email
refactor portal package structure
2 parents 1f6d2cd + d121abf commit 282e94d

File tree

62 files changed

+118
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+118
-117
lines changed

apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/AppController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.ctrip.framework.apollo.common.utils.BeanUtils;
55
import com.ctrip.framework.apollo.core.enums.Env;
66
import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO;
7-
import com.ctrip.framework.apollo.portal.PortalSettings;
7+
import com.ctrip.framework.apollo.portal.components.PortalSettings;
88
import com.ctrip.framework.apollo.portal.service.ClusterService;
99

1010
import org.springframework.beans.factory.annotation.Autowired;

apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
99
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
1010
import com.ctrip.framework.apollo.portal.service.ItemService;
11-
import com.ctrip.framework.apollo.portal.service.UserService;
11+
import com.ctrip.framework.apollo.portal.extend.UserService;
1212

1313
import org.springframework.beans.factory.annotation.Autowired;
1414
import org.springframework.security.access.prepost.PreAuthorize;

apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ReleaseController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
1111
import com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel;
1212
import com.ctrip.framework.apollo.portal.service.ReleaseService;
13-
import com.ctrip.framework.apollo.portal.service.UserService;
13+
import com.ctrip.framework.apollo.portal.extend.UserService;
1414

1515
import org.springframework.beans.factory.annotation.Autowired;
1616
import org.springframework.security.access.prepost.PreAuthorize;

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/API.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package com.ctrip.framework.apollo.portal.api;
22

33

4+
import com.ctrip.framework.apollo.portal.components.RetryableRestTemplate;
5+
46
import org.springframework.beans.factory.annotation.Autowired;
57

6-
public class API {
8+
public abstract class API {
79

810
@Autowired
911
protected RetryableRestTemplate restTemplate;

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/auth/UserInfoHolder.java

Lines changed: 0 additions & 12 deletions
This file was deleted.

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/AdminServiceAddressLocator.java renamed to apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/AdminServiceAddressLocator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
package com.ctrip.framework.apollo.portal.api;
1+
package com.ctrip.framework.apollo.portal.components;
22

33
import com.google.common.collect.Lists;
44

55
import com.ctrip.framework.apollo.core.MetaDomainConsts;
66
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
77
import com.ctrip.framework.apollo.core.enums.Env;
8-
import com.ctrip.framework.apollo.portal.PortalSettings;
98
import com.dianping.cat.Cat;
109

1110
import org.slf4j.Logger;

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/auth/PermissionValidator.java renamed to apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/PermissionValidator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
package com.ctrip.framework.apollo.portal.auth;
1+
package com.ctrip.framework.apollo.portal.components;
22

33
import com.ctrip.framework.apollo.common.entity.AppNamespace;
44
import com.ctrip.framework.apollo.portal.constant.PermissionType;
5+
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
56
import com.ctrip.framework.apollo.portal.service.RolePermissionService;
67
import com.ctrip.framework.apollo.portal.util.RoleUtils;
78

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/PortalSettings.java renamed to apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/PortalSettings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ctrip.framework.apollo.portal;
1+
package com.ctrip.framework.apollo.portal.components;
22

33

44
import com.ctrip.framework.apollo.core.enums.Env;
@@ -80,7 +80,7 @@ public List<Env> getActiveEnvs() {
8080
return activeEnvs;
8181
}
8282

83-
class HealthCheckTask implements Runnable {
83+
private class HealthCheckTask implements Runnable {
8484

8585
private static final int ENV_DOWN_THRESHOLD = 2;
8686

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/RestTemplateFactory.java renamed to apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/RestTemplateFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ctrip.framework.apollo.portal.api;
1+
package com.ctrip.framework.apollo.portal.components;
22

33
import com.google.common.io.BaseEncoding;
44

apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/RetryableRestTemplate.java renamed to apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/components/RetryableRestTemplate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.ctrip.framework.apollo.portal.api;
1+
package com.ctrip.framework.apollo.portal.components;
22

33
import com.ctrip.framework.apollo.common.exception.ServiceException;
44
import com.ctrip.framework.apollo.core.dto.ServiceDTO;

0 commit comments

Comments
 (0)