Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
apollo
Commits
007a3ed7
Commit
007a3ed7
authored
May 19, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename base package name 2 com.ctrip.framework.apollo
parent
58d59c1f
Changes
237
Hide whitespace changes
Inline
Side-by-side
Showing
237 changed files
with
901 additions
and
803 deletions
+901
-803
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/AdminServiceApplication.java
...ramework/apollo/adminservice/AdminServiceApplication.java
+7
-4
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/AdminServiceHealthIndicator.java
...work/apollo/adminservice/AdminServiceHealthIndicator.java
+2
-2
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java
...amework/apollo/adminservice/controller/AppController.java
+9
-9
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppNamespaceController.java
...pollo/adminservice/controller/AppNamespaceController.java
+6
-6
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/ClusterController.java
...ork/apollo/adminservice/controller/ClusterController.java
+7
-7
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/IndexController.java
...ework/apollo/adminservice/controller/IndexController.java
+1
-1
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/ItemController.java
...mework/apollo/adminservice/controller/ItemController.java
+7
-7
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/ItemSetController.java
...ork/apollo/adminservice/controller/ItemSetController.java
+4
-4
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/NamespaceController.java
...k/apollo/adminservice/controller/NamespaceController.java
+9
-9
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/PrivilegeController.java
...k/apollo/adminservice/controller/PrivilegeController.java
+1
-1
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/ReleaseController.java
...ork/apollo/adminservice/controller/ReleaseController.java
+13
-13
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/AdminServiceTestConfiguration.java
...ctrip/framework/apollo/AdminServiceTestConfiguration.java
+3
-3
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/LocalAdminServiceApplication.java
.../ctrip/framework/apollo/LocalAdminServiceApplication.java
+1
-1
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/AllTests.java
...ava/com/ctrip/framework/apollo/adminservice/AllTests.java
+18
-0
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/AbstractControllerTest.java
...pollo/adminservice/controller/AbstractControllerTest.java
+2
-2
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/AppControllerTest.java
...ork/apollo/adminservice/controller/AppControllerTest.java
+5
-5
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/AppNamespaceControllerTest.java
...o/adminservice/controller/AppNamespaceControllerTest.java
+4
-4
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ControllerExceptionTest.java
...ollo/adminservice/controller/ControllerExceptionTest.java
+7
-7
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ControllerIntegrationExceptionTest.java
...ervice/controller/ControllerIntegrationExceptionTest.java
+6
-5
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ItemSetControllerTest.java
...apollo/adminservice/controller/ItemSetControllerTest.java
+8
-8
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/ReleaseControllerTest.java
...apollo/adminservice/controller/ReleaseControllerTest.java
+13
-13
apollo-adminservice/src/test/java/com/ctrip/framework/apollo/adminservice/controller/TestWebSecurityConfig.java
...apollo/adminservice/controller/TestWebSecurityConfig.java
+1
-1
apollo-adminservice/src/test/resources/META-INF/plexus/plexus.xml
...dminservice/src/test/resources/META-INF/plexus/plexus.xml
+6
-6
apollo-assembly/src/main/java/com/ctrip/framework/apollo/assembly/ApolloApplication.java
...om/ctrip/framework/apollo/assembly/ApolloApplication.java
+4
-4
apollo-assembly/src/test/java/com/ctrip/framework/apollo/assembly/LocalApolloApplication.java
...rip/framework/apollo/assembly/LocalApolloApplication.java
+4
-4
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/ApolloBizConfig.java
.../java/com/ctrip/framework/apollo/biz/ApolloBizConfig.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/aop/RepositoryAspect.java
.../com/ctrip/framework/apollo/biz/aop/RepositoryAspect.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/customize/LoggingCustomizer.java
...rip/framework/apollo/biz/customize/LoggingCustomizer.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/customize/TomcatContainerCustomizer.java
...ework/apollo/biz/customize/TomcatContainerCustomizer.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/datasource/TitanCondition.java
...ctrip/framework/apollo/biz/datasource/TitanCondition.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/datasource/TitanEntityManager.java
...p/framework/apollo/biz/datasource/TitanEntityManager.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/datasource/TitanSettings.java
.../ctrip/framework/apollo/biz/datasource/TitanSettings.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/App.java
.../main/java/com/ctrip/framework/apollo/biz/entity/App.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
...a/com/ctrip/framework/apollo/biz/entity/AppNamespace.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Audit.java
...ain/java/com/ctrip/framework/apollo/biz/entity/Audit.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/BaseEntity.java
...ava/com/ctrip/framework/apollo/biz/entity/BaseEntity.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
...n/java/com/ctrip/framework/apollo/biz/entity/Cluster.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java
...in/java/com/ctrip/framework/apollo/biz/entity/Commit.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Item.java
...main/java/com/ctrip/framework/apollo/biz/entity/Item.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Namespace.java
...java/com/ctrip/framework/apollo/biz/entity/Namespace.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Privilege.java
...java/com/ctrip/framework/apollo/biz/entity/Privilege.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Release.java
...n/java/com/ctrip/framework/apollo/biz/entity/Release.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ReleaseMessage.java
...com/ctrip/framework/apollo/biz/entity/ReleaseMessage.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
...a/com/ctrip/framework/apollo/biz/entity/ServerConfig.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/eureka/ApolloEurekaClientConfig.java
...framework/apollo/biz/eureka/ApolloEurekaClientConfig.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/DatabaseMessageSender.java
...p/framework/apollo/biz/message/DatabaseMessageSender.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/MessageListener.java
...m/ctrip/framework/apollo/biz/message/MessageListener.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/MessageSender.java
...com/ctrip/framework/apollo/biz/message/MessageSender.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/ReleaseMessageScanner.java
...p/framework/apollo/biz/message/ReleaseMessageScanner.java
+4
-4
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/Topics.java
...n/java/com/ctrip/framework/apollo/biz/message/Topics.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/AppNamespaceRepository.java
...amework/apollo/biz/repository/AppNamespaceRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/AppRepository.java
.../ctrip/framework/apollo/biz/repository/AppRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/AuditRepository.java
...trip/framework/apollo/biz/repository/AuditRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ClusterRepository.java
...ip/framework/apollo/biz/repository/ClusterRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/CommitRepository.java
...rip/framework/apollo/biz/repository/CommitRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ItemRepository.java
...ctrip/framework/apollo/biz/repository/ItemRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/NamespaceRepository.java
.../framework/apollo/biz/repository/NamespaceRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/PrivilegeRepository.java
.../framework/apollo/biz/repository/PrivilegeRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ReleaseMessageRepository.java
...ework/apollo/biz/repository/ReleaseMessageRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ReleaseRepository.java
...ip/framework/apollo/biz/repository/ReleaseRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/repository/ServerConfigRepository.java
...amework/apollo/biz/repository/ServerConfigRepository.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AdminService.java
.../com/ctrip/framework/apollo/biz/service/AdminService.java
+2
-2
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AppNamespaceService.java
...rip/framework/apollo/biz/service/AppNamespaceService.java
+8
-8
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AppService.java
...va/com/ctrip/framework/apollo/biz/service/AppService.java
+6
-6
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AuditService.java
.../com/ctrip/framework/apollo/biz/service/AuditService.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ClusterService.java
...om/ctrip/framework/apollo/biz/service/ClusterService.java
+9
-8
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/CommitService.java
...com/ctrip/framework/apollo/biz/service/CommitService.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ConfigService.java
...com/ctrip/framework/apollo/biz/service/ConfigService.java
+3
-3
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ItemService.java
...a/com/ctrip/framework/apollo/biz/service/ItemService.java
+8
-8
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ItemSetService.java
...om/ctrip/framework/apollo/biz/service/ItemSetService.java
+7
-7
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/NamespaceService.java
.../ctrip/framework/apollo/biz/service/NamespaceService.java
+7
-7
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/PrivilegeService.java
.../ctrip/framework/apollo/biz/service/PrivilegeService.java
+4
-4
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ReleaseService.java
...om/ctrip/framework/apollo/biz/service/ReleaseService.java
+9
-9
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/utils/EntityManagerUtil.java
...m/ctrip/framework/apollo/biz/utils/EntityManagerUtil.java
+1
-1
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/utils/ReleaseKeyGenerator.java
...ctrip/framework/apollo/biz/utils/ReleaseKeyGenerator.java
+5
-5
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/AllTests.java
...rc/test/java/com/ctrip/framework/apollo/biz/AllTests.java
+26
-0
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/BizTestConfiguration.java
.../com/ctrip/framework/apollo/biz/BizTestConfiguration.java
+2
-2
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/eureka/ApolloEurekaClientConfigTest.java
...ework/apollo/biz/eureka/ApolloEurekaClientConfigTest.java
+3
-3
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/message/DatabaseMessageSenderTest.java
...amework/apollo/biz/message/DatabaseMessageSenderTest.java
+3
-3
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/message/ReleaseMessageScannerTest.java
...amework/apollo/biz/message/ReleaseMessageScannerTest.java
+3
-3
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/repository/AppNamespaceRepositoryTest.java
...ork/apollo/biz/repository/AppNamespaceRepositoryTest.java
+4
-4
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/repository/AppRepositoryTest.java
...ip/framework/apollo/biz/repository/AppRepositoryTest.java
+3
-3
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/service/AdminServiceTest.java
.../ctrip/framework/apollo/biz/service/AdminServiceTest.java
+9
-9
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/service/AdminServiceTransactionTest.java
...ework/apollo/biz/service/AdminServiceTransactionTest.java
+7
-7
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/service/ClusterServiceTest.java
...trip/framework/apollo/biz/service/ClusterServiceTest.java
+4
-4
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/service/ConfigServiceTest.java
...ctrip/framework/apollo/biz/service/ConfigServiceTest.java
+3
-3
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/service/PrivilegeServiceTest.java
...ip/framework/apollo/biz/service/PrivilegeServiceTest.java
+6
-6
apollo-biz/src/test/java/com/ctrip/framework/apollo/biz/utils/ReleaseKeyGeneratorTest.java
...p/framework/apollo/biz/utils/ReleaseKeyGeneratorTest.java
+2
-2
apollo-buildtools/src/main/java/com/ctrip/framework/apollo/cat/NullClientConfigManager.java
...m/ctrip/framework/apollo/cat/NullClientConfigManager.java
+2
-2
apollo-buildtools/src/main/java/com/ctrip/framework/apollo/cat/NullLoggerManager.java
...ava/com/ctrip/framework/apollo/cat/NullLoggerManager.java
+1
-1
apollo-buildtools/src/main/java/com/ctrip/framework/apollo/cat/NullMessageManager.java
...va/com/ctrip/framework/apollo/cat/NullMessageManager.java
+1
-1
apollo-buildtools/src/main/java/com/ctrip/framework/apollo/cat/NullMessageProducer.java
...a/com/ctrip/framework/apollo/cat/NullMessageProducer.java
+1
-1
apollo-buildtools/src/main/java/com/ctrip/framework/apollo/cat/NullTransportManager.java
.../com/ctrip/framework/apollo/cat/NullTransportManager.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/Config.java
...ient/src/main/java/com/ctrip/framework/apollo/Config.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/ConfigChangeListener.java
...java/com/ctrip/framework/apollo/ConfigChangeListener.java
+2
-2
apollo-client/src/main/java/com/ctrip/framework/apollo/ConfigService.java
...c/main/java/com/ctrip/framework/apollo/ConfigService.java
+5
-5
apollo-client/src/main/java/com/ctrip/framework/apollo/build/ComponentConfigurator.java
...m/ctrip/framework/apollo/build/ComponentConfigurator.java
+8
-8
apollo-client/src/main/java/com/ctrip/framework/apollo/enums/PropertyChangeType.java
.../com/ctrip/framework/apollo/enums/PropertyChangeType.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/AbstractConfig.java
.../com/ctrip/framework/apollo/internals/AbstractConfig.java
+7
-7
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/AbstractConfigRepository.java
.../framework/apollo/internals/AbstractConfigRepository.java
+2
-2
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigManager.java
...a/com/ctrip/framework/apollo/internals/ConfigManager.java
+2
-2
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigRepository.java
...om/ctrip/framework/apollo/internals/ConfigRepository.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java
...trip/framework/apollo/internals/ConfigServiceLocator.java
+7
-7
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfig.java
...a/com/ctrip/framework/apollo/internals/DefaultConfig.java
+7
-6
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultConfigManager.java
...trip/framework/apollo/internals/DefaultConfigManager.java
+4
-4
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/LocalFileConfigRepository.java
...framework/apollo/internals/LocalFileConfigRepository.java
+4
-4
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RemoteConfigRepository.java
...ip/framework/apollo/internals/RemoteConfigRepository.java
+13
-13
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/RepositoryChangeListener.java
.../framework/apollo/internals/RepositoryChangeListener.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/internals/SimpleConfig.java
...va/com/ctrip/framework/apollo/internals/SimpleConfig.java
+4
-4
apollo-client/src/main/java/com/ctrip/framework/apollo/model/ConfigChange.java
...n/java/com/ctrip/framework/apollo/model/ConfigChange.java
+2
-2
apollo-client/src/main/java/com/ctrip/framework/apollo/model/ConfigChangeEvent.java
...a/com/ctrip/framework/apollo/model/ConfigChangeEvent.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/ConfigFactory.java
...in/java/com/ctrip/framework/apollo/spi/ConfigFactory.java
+2
-2
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/ConfigFactoryManager.java
.../com/ctrip/framework/apollo/spi/ConfigFactoryManager.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/ConfigRegistry.java
...n/java/com/ctrip/framework/apollo/spi/ConfigRegistry.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/DefaultConfigFactory.java
.../com/ctrip/framework/apollo/spi/DefaultConfigFactory.java
+7
-7
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/DefaultConfigFactoryManager.java
...rip/framework/apollo/spi/DefaultConfigFactoryManager.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/spi/DefaultConfigRegistry.java
...com/ctrip/framework/apollo/spi/DefaultConfigRegistry.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
...main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
+5
-5
apollo-client/src/main/java/com/ctrip/framework/apollo/util/ExceptionUtil.java
...n/java/com/ctrip/framework/apollo/util/ExceptionUtil.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/util/http/HttpRequest.java
...ava/com/ctrip/framework/apollo/util/http/HttpRequest.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/util/http/HttpResponse.java
...va/com/ctrip/framework/apollo/util/http/HttpResponse.java
+1
-1
apollo-client/src/main/java/com/ctrip/framework/apollo/util/http/HttpUtil.java
...n/java/com/ctrip/framework/apollo/util/http/HttpUtil.java
+2
-2
apollo-client/src/main/resources/META-INF/plexus/components.xml
...-client/src/main/resources/META-INF/plexus/components.xml
+19
-19
apollo-client/src/test/java/com/ctrip/framework/apollo/AllTests.java
...nt/src/test/java/com/ctrip/framework/apollo/AllTests.java
+28
-0
apollo-client/src/test/java/com/ctrip/framework/apollo/BaseIntegrationTest.java
.../java/com/ctrip/framework/apollo/BaseIntegrationTest.java
+5
-6
apollo-client/src/test/java/com/ctrip/framework/apollo/ConfigServiceTest.java
...st/java/com/ctrip/framework/apollo/ConfigServiceTest.java
+5
-5
apollo-client/src/test/java/com/ctrip/framework/apollo/integration/ConfigIntegrationTest.java
...p/framework/apollo/integration/ConfigIntegrationTest.java
+10
-10
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/DefaultConfigManagerTest.java
.../framework/apollo/internals/DefaultConfigManagerTest.java
+4
-4
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/DefaultConfigTest.java
...m/ctrip/framework/apollo/internals/DefaultConfigTest.java
+6
-6
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/LocalFileConfigRepositoryTest.java
...ework/apollo/internals/LocalFileConfigRepositoryTest.java
+3
-3
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/RemoteConfigRepositoryTest.java
...ramework/apollo/internals/RemoteConfigRepositoryTest.java
+8
-8
apollo-client/src/test/java/com/ctrip/framework/apollo/internals/SimpleConfigTest.java
...om/ctrip/framework/apollo/internals/SimpleConfigTest.java
+6
-6
apollo-client/src/test/java/com/ctrip/framework/apollo/spi/DefaultConfigFactoryManagerTest.java
...framework/apollo/spi/DefaultConfigFactoryManagerTest.java
+2
-2
apollo-client/src/test/java/com/ctrip/framework/apollo/spi/DefaultConfigFactoryTest.java
.../ctrip/framework/apollo/spi/DefaultConfigFactoryTest.java
+4
-4
apollo-client/src/test/java/com/ctrip/framework/apollo/spi/DefaultConfigRegistryTest.java
...ctrip/framework/apollo/spi/DefaultConfigRegistryTest.java
+2
-2
apollo-client/src/test/java/com/ctrip/framework/apollo/util/ExceptionUtilTest.java
...va/com/ctrip/framework/apollo/util/ExceptionUtilTest.java
+1
-1
apollo-client/src/test/resources/META-INF/plexus/plexus.xml
apollo-client/src/test/resources/META-INF/plexus/plexus.xml
+6
-6
apollo-client/src/test/resources/log4j2.xml
apollo-client/src/test/resources/log4j2.xml
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/ApolloCommonConfig.java
...com/ctrip/framework/apollo/common/ApolloCommonConfig.java
+2
-2
apollo-common/src/main/java/com/ctrip/framework/apollo/common/auth/ActiveUser.java
...va/com/ctrip/framework/apollo/common/auth/ActiveUser.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/auth/RestTemplateFactory.java
...rip/framework/apollo/common/auth/RestTemplateFactory.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/ApolloInfoController.java
...mework/apollo/common/controller/ApolloInfoController.java
+2
-2
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/CatConfig.java
...m/ctrip/framework/apollo/common/controller/CatConfig.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/CharacterEncodingFilterConfiguration.java
...mmon/controller/CharacterEncodingFilterConfiguration.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/GlobalDefaultExceptionHandler.java
...ollo/common/controller/GlobalDefaultExceptionHandler.java
+4
-4
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/HttpMessageConverterConfiguration.java
.../common/controller/HttpMessageConverterConfiguration.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/WebMvcConfig.java
...trip/framework/apollo/common/controller/WebMvcConfig.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/controller/WebSecurityConfig.java
...framework/apollo/common/controller/WebSecurityConfig.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/http/MultiResponseEntity.java
...rip/framework/apollo/common/http/MultiResponseEntity.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/http/RichResponseEntity.java
...trip/framework/apollo/common/http/RichResponseEntity.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/utils/BeanUtils.java
...va/com/ctrip/framework/apollo/common/utils/BeanUtils.java
+1
-1
apollo-common/src/main/java/com/ctrip/framework/apollo/common/utils/ExceptionUtils.java
...m/ctrip/framework/apollo/common/utils/ExceptionUtils.java
+1
-1
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServiceApplication.java
...mework/apollo/configservice/ConfigServiceApplication.java
+9
-5
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServiceAutoConfiguration.java
.../apollo/configservice/ConfigServiceAutoConfiguration.java
+3
-3
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ConfigServiceHealthIndicator.java
...rk/apollo/configservice/ConfigServiceHealthIndicator.java
+2
-2
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/ServletInitializer.java
...ip/framework/apollo/configservice/ServletInitializer.java
+1
-1
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/ConfigController.java
...ork/apollo/configservice/controller/ConfigController.java
+7
-7
apollo-configservice/src/main/java/com/ctrip/framework/apollo/configservice/controller/NotificationController.java
...ollo/configservice/controller/NotificationController.java
+8
-8
apollo-configservice/src/main/java/com/ctrip/framework/apollo/metaservice/ApolloMetaServiceConfig.java
...framework/apollo/metaservice/ApolloMetaServiceConfig.java
+2
-2
apollo-configservice/src/main/java/com/ctrip/framework/apollo/metaservice/controller/ServiceController.java
...work/apollo/metaservice/controller/ServiceController.java
+3
-3
apollo-configservice/src/main/java/com/ctrip/framework/apollo/metaservice/service/DiscoveryService.java
...ramework/apollo/metaservice/service/DiscoveryService.java
+2
-2
apollo-configservice/src/test/java/com/ctrip/framework/apollo/ConfigServiceTestConfiguration.java
...trip/framework/apollo/ConfigServiceTestConfiguration.java
+3
-3
apollo-configservice/src/test/java/com/ctrip/framework/apollo/LocalConfigServiceApplication.java
...ctrip/framework/apollo/LocalConfigServiceApplication.java
+1
-1
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/AllTests.java
...va/com/ctrip/framework/apollo/configservice/AllTests.java
+17
-0
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/ConfigControllerTest.java
...apollo/configservice/controller/ConfigControllerTest.java
+9
-9
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/NotificationControllerTest.java
.../configservice/controller/NotificationControllerTest.java
+7
-7
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/controller/TestWebSecurityConfig.java
...pollo/configservice/controller/TestWebSecurityConfig.java
+1
-1
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/AbstractBaseIntegrationTest.java
...onfigservice/integration/AbstractBaseIntegrationTest.java
+2
-2
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/ConfigControllerIntegrationTest.java
...gservice/integration/ConfigControllerIntegrationTest.java
+3
-3
apollo-configservice/src/test/java/com/ctrip/framework/apollo/configservice/integration/NotificationControllerIntegrationTest.java
...ce/integration/NotificationControllerIntegrationTest.java
+6
-6
apollo-configservice/src/test/resources/META-INF/plexus/plexus.xml
...nfigservice/src/test/resources/META-INF/plexus/plexus.xml
+6
-6
apollo-core/src/main/java/com/ctrip/framework/apollo/Apollo.java
...core/src/main/java/com/ctrip/framework/apollo/Apollo.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/ConfigConsts.java
...in/java/com/ctrip/framework/apollo/core/ConfigConsts.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/MetaDomainConsts.java
...ava/com/ctrip/framework/apollo/core/MetaDomainConsts.java
+3
-3
apollo-core/src/main/java/com/ctrip/framework/apollo/core/ServiceNameConsts.java
...va/com/ctrip/framework/apollo/core/ServiceNameConsts.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ApolloConfig.java
...ava/com/ctrip/framework/apollo/core/dto/ApolloConfig.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ApolloConfigNotification.java
...p/framework/apollo/core/dto/ApolloConfigNotification.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/AppDTO.java
...main/java/com/ctrip/framework/apollo/core/dto/AppDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/AppNamespaceDTO.java
.../com/ctrip/framework/apollo/core/dto/AppNamespaceDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ClusterDTO.java
.../java/com/ctrip/framework/apollo/core/dto/ClusterDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ItemChangeSets.java
...a/com/ctrip/framework/apollo/core/dto/ItemChangeSets.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ItemDTO.java
...ain/java/com/ctrip/framework/apollo/core/dto/ItemDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/NamespaceDTO.java
...ava/com/ctrip/framework/apollo/core/dto/NamespaceDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ReleaseDTO.java
.../java/com/ctrip/framework/apollo/core/dto/ReleaseDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ServiceDTO.java
.../java/com/ctrip/framework/apollo/core/dto/ServiceDTO.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/Env.java
.../main/java/com/ctrip/framework/apollo/core/enums/Env.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/enums/EnvUtils.java
.../java/com/ctrip/framework/apollo/core/enums/EnvUtils.java
+2
-2
apollo-core/src/main/java/com/ctrip/framework/apollo/core/exception/AbstractBaseException.java
...ramework/apollo/core/exception/AbstractBaseException.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/exception/BadRequestException.java
.../framework/apollo/core/exception/BadRequestException.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/exception/NotFoundException.java
...ip/framework/apollo/core/exception/NotFoundException.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/exception/ServiceException.java
...rip/framework/apollo/core/exception/ServiceException.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/schedule/ExponentialSchedulePolicy.java
...ework/apollo/core/schedule/ExponentialSchedulePolicy.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/schedule/SchedulePolicy.java
.../ctrip/framework/apollo/core/schedule/SchedulePolicy.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/ApolloThreadFactory.java
...trip/framework/apollo/core/utils/ApolloThreadFactory.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/ByteUtil.java
.../java/com/ctrip/framework/apollo/core/utils/ByteUtil.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/ClassLoaderUtil.java
...om/ctrip/framework/apollo/core/utils/ClassLoaderUtil.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/DNSUtil.java
...n/java/com/ctrip/framework/apollo/core/utils/DNSUtil.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/MachineUtil.java
...va/com/ctrip/framework/apollo/core/utils/MachineUtil.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/ResourceUtils.java
.../com/ctrip/framework/apollo/core/utils/ResourceUtils.java
+1
-1
apollo-core/src/main/java/com/ctrip/framework/apollo/core/utils/StringUtils.java
...va/com/ctrip/framework/apollo/core/utils/StringUtils.java
+1
-1
apollo-core/src/test/java/com/ctrip/framework/apollo/core/AllTests.java
...c/test/java/com/ctrip/framework/apollo/core/AllTests.java
+1
-1
apollo-core/src/test/java/com/ctrip/framework/apollo/core/MetaDomainTest.java
.../java/com/ctrip/framework/apollo/core/MetaDomainTest.java
+2
-2
apollo-demo/src/main/java/ApolloConfigDemo.java
apollo-demo/src/main/java/ApolloConfigDemo.java
+5
-5
apollo-demo/src/main/resources/log4j2.xml
apollo-demo/src/main/resources/log4j2.xml
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/PortalApplication.java
.../com/ctrip/framework/apollo/portal/PortalApplication.java
+5
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/PortalSettings.java
...ava/com/ctrip/framework/apollo/portal/PortalSettings.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/API.java
.../main/java/com/ctrip/framework/apollo/portal/api/API.java
+4
-4
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/api/AdminServiceAPI.java
...om/ctrip/framework/apollo/portal/api/AdminServiceAPI.java
+10
-10
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/constants/PortalConstants.java
...ip/framework/apollo/portal/constants/PortalConstants.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalAppController.java
...amework/apollo/portal/controller/PortalAppController.java
+10
-10
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalConfigController.java
...work/apollo/portal/controller/PortalConfigController.java
+13
-13
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalEnvController.java
...amework/apollo/portal/controller/PortalEnvController.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PortalNamespaceController.java
...k/apollo/portal/controller/PortalNamespaceController.java
+9
-9
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/EnvClusterInfo.java
.../ctrip/framework/apollo/portal/entity/EnvClusterInfo.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/ItemDiffs.java
...a/com/ctrip/framework/apollo/portal/entity/ItemDiffs.java
+2
-2
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/NamespaceIdentifer.java
...ip/framework/apollo/portal/entity/NamespaceIdentifer.java
+5
-5
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/NamespaceVO.java
...com/ctrip/framework/apollo/portal/entity/NamespaceVO.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/NamespaceReleaseModel.java
...work/apollo/portal/entity/form/NamespaceReleaseModel.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/NamespaceSyncModel.java
...amework/apollo/portal/entity/form/NamespaceSyncModel.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/NamespaceTextModel.java
...amework/apollo/portal/entity/form/NamespaceTextModel.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/entity/form/Verifiable.java
...ctrip/framework/apollo/portal/entity/form/Verifiable.java
+1
-1
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalAppService.java
...rip/framework/apollo/portal/service/PortalAppService.java
+9
-9
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalClusterService.java
...framework/apollo/portal/service/PortalClusterService.java
+4
-4
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalConfigService.java
.../framework/apollo/portal/service/PortalConfigService.java
+16
-16
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/PortalNamespaceService.java
...amework/apollo/portal/service/PortalNamespaceService.java
+11
-11
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ServiceLocator.java
...ctrip/framework/apollo/portal/service/ServiceLocator.java
+5
-5
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/txtresolver/ConfigTextResolver.java
...apollo/portal/service/txtresolver/ConfigTextResolver.java
+3
-3
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/txtresolver/PropertyResolver.java
...k/apollo/portal/service/txtresolver/PropertyResolver.java
+6
-6
apollo-portal/src/test/java/com/ctrip/framework/apollo/LocalPortalApplication.java
...va/com/ctrip/framework/apollo/LocalPortalApplication.java
+1
-1
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AbstractPortalTest.java
...com/ctrip/framework/apollo/portal/AbstractPortalTest.java
+1
-3
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/AllTests.java
...test/java/com/ctrip/framework/apollo/portal/AllTests.java
+1
-1
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/ConfigServiceTest.java
.../com/ctrip/framework/apollo/portal/ConfigServiceTest.java
+13
-13
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/NamespaceServiceTest.java
...m/ctrip/framework/apollo/portal/NamespaceServiceTest.java
+10
-10
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/PropertyResolverTest.java
...m/ctrip/framework/apollo/portal/PropertyResolverTest.java
+5
-5
apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/ServiceExceptionTest.java
...m/ctrip/framework/apollo/portal/ServiceExceptionTest.java
+8
-7
apollo-portal/src/test/resources/META-INF/plexus/plexus.xml
apollo-portal/src/test/resources/META-INF/plexus/plexus.xml
+6
-6
application.pid
application.pid
+0
-1
No files found.
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/AdminServiceApplication.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/AdminServiceApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
;
import
com.ctrip.framework.apollo.biz.ApolloBizConfig
;
import
com.ctrip.framework.apollo.common.ApolloCommonConfig
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
import
org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter
;
import
org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter
;
...
@@ -18,9 +21,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -18,9 +21,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@PropertySource
(
value
=
{
"classpath:adminservice.properties"
})
@PropertySource
(
value
=
{
"classpath:adminservice.properties"
})
@EnableAutoConfiguration
@EnableAutoConfiguration
@EnableTransactionManagement
@EnableTransactionManagement
@ComponentScan
(
basePackageClasses
=
{
com
.
ctrip
.
apollo
.
common
.
ApolloCommonConfig
.
class
,
@ComponentScan
(
basePackageClasses
=
{
ApolloCommonConfig
.
class
,
com
.
ctrip
.
apollo
.
biz
.
ApolloBizConfig
.
class
,
ApolloBizConfig
.
class
,
com
.
ctrip
.
apollo
.
adminservice
.
AdminServiceApplication
.
class
})
AdminServiceApplication
.
class
})
public
class
AdminServiceApplication
{
public
class
AdminServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
ConfigurableApplicationContext
context
=
ConfigurableApplicationContext
context
=
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/AdminServiceHealthIndicator.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/AdminServiceHealthIndicator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.actuate.health.Health
;
import
org.springframework.boot.actuate.health.Health
;
...
@@ -6,7 +6,7 @@ import org.springframework.boot.actuate.health.HealthIndicator;
...
@@ -6,7 +6,7 @@ import org.springframework.boot.actuate.health.HealthIndicator;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.ctrip.apollo.biz.service.AppService
;
import
com.ctrip.
framework.
apollo.biz.service.AppService
;
@Component
@Component
public
class
AdminServiceHealthIndicator
implements
HealthIndicator
{
public
class
AdminServiceHealthIndicator
implements
HealthIndicator
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/AppController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/AppController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -12,14 +12,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.service.AdminService
;
import
com.ctrip.
framework.
apollo.biz.service.AdminService
;
import
com.ctrip.apollo.biz.service.AppService
;
import
com.ctrip.
framework.
apollo.biz.service.AppService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
@RestController
@RestController
public
class
AppController
{
public
class
AppController
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/AppNamespaceController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/AppNamespaceController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
...
@@ -8,11 +8,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -8,11 +8,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.service.AppNamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.AppNamespaceService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppNamespaceDTO
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/ClusterController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/ClusterController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
java.util.List
;
import
java.util.List
;
...
@@ -10,12 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -10,12 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.
framework.
apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.service.ClusterService
;
import
com.ctrip.
framework.
apollo.biz.service.ClusterService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
@RestController
@RestController
public
class
ClusterController
{
public
class
ClusterController
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/IndexController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/IndexController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/ItemController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/ItemController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -11,12 +11,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -11,12 +11,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
import
com.ctrip.apollo.biz.service.ItemService
;
import
com.ctrip.
framework.
apollo.biz.service.ItemService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
@RestController
@RestController
public
class
ItemController
{
public
class
ItemController
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/ItemSetController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/ItemSetController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -9,9 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -9,9 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.service.ItemSetService
;
import
com.ctrip.
framework.
apollo.biz.service.ItemSetService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
@RestController
@RestController
public
class
ItemSetController
{
public
class
ItemSetController
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/NamespaceController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/NamespaceController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
java.util.List
;
import
java.util.List
;
...
@@ -10,12 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -10,12 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.service.NamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.NamespaceService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
@RestController
@RestController
public
class
NamespaceController
{
public
class
NamespaceController
{
...
@@ -25,8 +25,8 @@ public class NamespaceController {
...
@@ -25,8 +25,8 @@ public class NamespaceController {
@RequestMapping
(
path
=
"/apps/{appId}/clusters/{clusterName}/namespaces"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
path
=
"/apps/{appId}/clusters/{clusterName}/namespaces"
,
method
=
RequestMethod
.
POST
)
public
NamespaceDTO
createOrUpdate
(
@PathVariable
(
"appId"
)
String
appId
,
public
NamespaceDTO
createOrUpdate
(
@PathVariable
(
"appId"
)
String
appId
,
@PathVariable
(
"clusterName"
)
String
clusterName
,
@RequestBody
NamespaceDTO
dto
,
@PathVariable
(
"clusterName"
)
String
clusterName
,
@RequestBody
NamespaceDTO
dto
,
@ActiveUser
UserDetails
user
)
{
@ActiveUser
UserDetails
user
)
{
Namespace
entity
=
BeanUtils
.
transfrom
(
Namespace
.
class
,
dto
);
Namespace
entity
=
BeanUtils
.
transfrom
(
Namespace
.
class
,
dto
);
Namespace
managedEntity
=
namespaceService
.
findOne
(
appId
,
clusterName
,
entity
.
getNamespaceName
());
Namespace
managedEntity
=
namespaceService
.
findOne
(
appId
,
clusterName
,
entity
.
getNamespaceName
());
if
(
managedEntity
!=
null
)
{
if
(
managedEntity
!=
null
)
{
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/PrivilegeController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/PrivilegeController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
apollo-adminservice/src/main/java/com/ctrip/apollo/adminservice/controller/ReleaseController.java
→
apollo-adminservice/src/main/java/com/ctrip/
framework/
apollo/adminservice/controller/ReleaseController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.message.MessageSender
;
import
com.ctrip.
framework.
apollo.biz.message.MessageSender
;
import
com.ctrip.apollo.biz.message.Topics
;
import
com.ctrip.
framework.
apollo.biz.message.Topics
;
import
com.ctrip.apollo.biz.service.ConfigService
;
import
com.ctrip.
framework.
apollo.biz.service.ConfigService
;
import
com.ctrip.apollo.biz.service.NamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.NamespaceService
;
import
com.ctrip.apollo.biz.service.ReleaseService
;
import
com.ctrip.
framework.
apollo.biz.service.ReleaseService
;
import
com.ctrip.apollo.common.auth.ActiveUser
;
import
com.ctrip.
framework.
apollo.common.auth.ActiveUser
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/AdminServiceTestConfiguration.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/AdminServiceTestConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.common.controller.HttpMessageConverterConfiguration
;
import
com.ctrip.
framework.
apollo.common.controller.HttpMessageConverterConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.ComponentScan.Filter;
...
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.ComponentScan.Filter;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.context.annotation.FilterType
;
import
com.ctrip.apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.
framework.
apollo.adminservice.AdminServiceApplication
;
@Configuration
@Configuration
@ComponentScan
(
excludeFilters
=
{
@Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
value
=
{
@ComponentScan
(
excludeFilters
=
{
@Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
value
=
{
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/LocalAdminServiceApplication.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/LocalAdminServiceApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/AllTests.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite.SuiteClasses
;
import
org.junit.runners.Suite.SuiteClasses
;
import
com.ctrip.apollo.adminservice.controller.AppControllerTest
;
import
com.ctrip.
framework.
apollo.adminservice.controller.AppControllerTest
;
import
com.ctrip.apollo.adminservice.controller.ControllerExceptionTest
;
import
com.ctrip.
framework.
apollo.adminservice.controller.ControllerExceptionTest
;
import
com.ctrip.apollo.adminservice.controller.ControllerIntegrationExceptionTest
;
import
com.ctrip.
framework.
apollo.adminservice.controller.ControllerIntegrationExceptionTest
;
import
com.ctrip.apollo.adminservice.controller.ItemSetControllerTest
;
import
com.ctrip.
framework.
apollo.adminservice.controller.ItemSetControllerTest
;
import
com.ctrip.apollo.adminservice.controller.ReleaseControllerTest
;
import
com.ctrip.
framework.
apollo.adminservice.controller.ReleaseControllerTest
;
@RunWith
(
Suite
.
class
)
@RunWith
(
Suite
.
class
)
@SuiteClasses
({
AppControllerTest
.
class
,
ReleaseControllerTest
.
class
,
ItemSetControllerTest
.
class
,
@SuiteClasses
({
AppControllerTest
.
class
,
ReleaseControllerTest
.
class
,
ItemSetControllerTest
.
class
,
ControllerExceptionTest
.
class
,
ControllerIntegrationExceptionTest
.
class
})
ControllerExceptionTest
.
class
,
ControllerIntegrationExceptionTest
.
class
})
public
class
AllTests
{
public
class
AllTests
{
}
}
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/AbstractControllerTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/AbstractControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
...
@@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
...
@@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
com.ctrip.apollo.AdminServiceTestConfiguration
;
import
com.ctrip.
framework.
apollo.AdminServiceTestConfiguration
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
AdminServiceTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
AdminServiceTestConfiguration
.
class
)
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/AppControllerTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/AppControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -9,10 +9,10 @@ import org.springframework.test.context.jdbc.Sql;
...
@@ -9,10 +9,10 @@ import org.springframework.test.context.jdbc.Sql;
import
org.springframework.test.context.jdbc.Sql.ExecutionPhase
;
import
org.springframework.test.context.jdbc.Sql.ExecutionPhase
;
import
org.springframework.web.client.HttpClientErrorException
;
import
org.springframework.web.client.HttpClientErrorException
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.repository.AppRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
public
class
AppControllerTest
extends
AbstractControllerTest
{
public
class
AppControllerTest
extends
AbstractControllerTest
{
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/AppNamespaceControllerTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/AppNamespaceControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppNamespaceDTO
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/ControllerExceptionTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/ControllerExceptionTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Mockito
.
when
;
import
static
org
.
mockito
.
Mockito
.
when
;
...
@@ -19,12 +19,12 @@ import org.springframework.security.core.userdetails.User;
...
@@ -19,12 +19,12 @@ import org.springframework.security.core.userdetails.User;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.service.AdminService
;
import
com.ctrip.
framework.
apollo.biz.service.AdminService
;
import
com.ctrip.apollo.biz.service.AppService
;
import
com.ctrip.
framework.
apollo.biz.service.AppService
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
@RunWith
(
MockitoJUnitRunner
.
class
)
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
ControllerExceptionTest
{
public
class
ControllerExceptionTest
{
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/ControllerIntegrationExceptionTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/ControllerIntegrationExceptionTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Mockito
.
when
;
import
static
org
.
mockito
.
Mockito
.
when
;
...
@@ -16,10 +16,11 @@ import org.springframework.test.context.jdbc.Sql.ExecutionPhase;
...
@@ -16,10 +16,11 @@ import org.springframework.test.context.jdbc.Sql.ExecutionPhase;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.framework.apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.service.AdminService
;
import
com.ctrip.framework.apollo.biz.service.AdminService
;
import
com.ctrip.apollo.biz.service.AppService
;
import
com.ctrip.framework.apollo.biz.service.AppService
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.framework.apollo.core.dto.AppDTO
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
public
class
ControllerIntegrationExceptionTest
extends
AbstractControllerTest
{
public
class
ControllerIntegrationExceptionTest
extends
AbstractControllerTest
{
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/ItemSetControllerTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/ItemSetControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,13 +12,13 @@ import org.springframework.test.context.jdbc.Sql;
...
@@ -12,13 +12,13 @@ import org.springframework.test.context.jdbc.Sql;
import
org.springframework.test.context.jdbc.Sql.ExecutionPhase
;
import
org.springframework.test.context.jdbc.Sql.ExecutionPhase
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
import
com.ctrip.apollo.biz.repository.ItemRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ItemRepository
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
public
class
ItemSetControllerTest
extends
AbstractControllerTest
{
public
class
ItemSetControllerTest
extends
AbstractControllerTest
{
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/ReleaseControllerTest.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/ReleaseControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.message.MessageSender
;
import
com.ctrip.
framework.
apollo.biz.message.MessageSender
;
import
com.ctrip.apollo.biz.message.Topics
;
import
com.ctrip.
framework.
apollo.biz.message.Topics
;
import
com.ctrip.apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.apollo.biz.service.NamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.NamespaceService
;
import
com.ctrip.apollo.biz.service.ReleaseService
;
import
com.ctrip.
framework.
apollo.biz.service.ReleaseService
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-adminservice/src/test/java/com/ctrip/apollo/adminservice/controller/TestWebSecurityConfig.java
→
apollo-adminservice/src/test/java/com/ctrip/
framework/
apollo/adminservice/controller/TestWebSecurityConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
adminservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
adminservice
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
...
apollo-adminservice/src/test/resources/META-INF/plexus/plexus.xml
View file @
007a3ed7
...
@@ -2,17 +2,17 @@
...
@@ -2,17 +2,17 @@
<components>
<components>
<component>
<component>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<implementation>
com.ctrip.apollo.cat.NullClientConfigManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullClientConfigManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<implementation>
com.ctrip.apollo.cat.NullTransportManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullTransportManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageManager
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.MessageProducer
</role>
<role>
com.dianping.cat.message.MessageProducer
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageProducer
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageProducer
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</component>
</component>
<component>
<component>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<implementation>
com.ctrip.apollo.cat.NullLoggerManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullLoggerManager
</implementation>
</implementation>
</component>
</component>
</components>
</components>
</plexus>
</plexus>
\ No newline at end of file
apollo-assembly/src/main/java/com/ctrip/apollo/assembly/ApolloApplication.java
→
apollo-assembly/src/main/java/com/ctrip/
framework/
apollo/assembly/ApolloApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
assembly
;
package
com
.
ctrip
.
framework
.
apollo
.
assembly
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -10,9 +10,9 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
...
@@ -10,9 +10,9 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
com.ctrip.apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.
framework.
apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.
framework.
apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.apollo.portal.PortalApplication
;
import
com.ctrip.
framework.
apollo.portal.PortalApplication
;
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
HibernateJpaAutoConfiguration
.
class
})
HibernateJpaAutoConfiguration
.
class
})
...
...
apollo-assembly/src/test/java/com/ctrip/apollo/assembly/LocalApolloApplication.java
→
apollo-assembly/src/test/java/com/ctrip/
framework/
apollo/assembly/LocalApolloApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
assembly
;
package
com
.
ctrip
.
framework
.
apollo
.
assembly
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -10,9 +10,9 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
...
@@ -10,9 +10,9 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
import
org.springframework.cloud.context.scope.refresh.RefreshScope
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
com.ctrip.apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.
framework.
apollo.adminservice.AdminServiceApplication
;
import
com.ctrip.apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.
framework.
apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.apollo.portal.PortalApplication
;
import
com.ctrip.
framework.
apollo.portal.PortalApplication
;
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
,
HibernateJpaAutoConfiguration
.
class
})
HibernateJpaAutoConfiguration
.
class
})
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/ApolloBizConfig.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/ApolloBizConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
@EnableAutoConfiguration
@EnableAutoConfiguration
@Configuration
@Configuration
@ComponentScan
(
basePackageClasses
=
com
.
ctrip
.
apollo
.
biz
.
ApolloBizConfig
.
class
)
@ComponentScan
(
basePackageClasses
=
ApolloBizConfig
.
class
)
public
class
ApolloBizConfig
{
public
class
ApolloBizConfig
{
}
}
apollo-biz/src/main/java/com/ctrip/apollo/biz/aop/RepositoryAspect.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/aop/RepositoryAspect.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
aop
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
aop
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/customize/LoggingCustomizer.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/customize/LoggingCustomizer.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
customize
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
customize
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.ctrip.apollo.biz.entity.ServerConfig
;
import
com.ctrip.
framework.
apollo.biz.entity.ServerConfig
;
import
com.ctrip.apollo.biz.repository.ServerConfigRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ServerConfigRepository
;
import
com.ctrip.framework.foundation.Foundation
;
import
com.ctrip.framework.foundation.Foundation
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/customize/TomcatContainerCustomizer.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/customize/TomcatContainerCustomizer.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
customize
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
customize
;
import
org.apache.catalina.connector.Connector
;
import
org.apache.catalina.connector.Connector
;
import
org.apache.coyote.ProtocolHandler
;
import
org.apache.coyote.ProtocolHandler
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/datasource/TitanCondition.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/datasource/TitanCondition.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
datasource
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
datasource
;
import
org.springframework.context.annotation.Condition
;
import
org.springframework.context.annotation.Condition
;
import
org.springframework.context.annotation.ConditionContext
;
import
org.springframework.context.annotation.ConditionContext
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
public
class
TitanCondition
implements
Condition
{
public
class
TitanCondition
implements
Condition
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/datasource/TitanEntityManager.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/datasource/TitanEntityManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
datasource
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
datasource
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/datasource/TitanSettings.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/datasource/TitanSettings.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
datasource
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
datasource
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.enums.EnvUtils
;
import
com.ctrip.
framework.
apollo.core.enums.EnvUtils
;
import
com.ctrip.framework.foundation.Foundation
;
import
com.ctrip.framework.foundation.Foundation
;
@Component
@Component
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/App.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/App.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/AppNamespace.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/AppNamespace.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Audit.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Audit.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/BaseEntity.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/BaseEntity.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
java.util.Date
;
import
java.util.Date
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Cluster.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Cluster.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Commit.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Commit.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Item.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Item.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Namespace.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Namespace.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Privilege.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Privilege.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/Release.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/Release.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ReleaseMessage.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/ReleaseMessage.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
java.util.Date
;
import
java.util.Date
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/entity/ServerConfig.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/entity/ServerConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
entity
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.SQLDelete
;
import
org.hibernate.annotations.Where
;
import
org.hibernate.annotations.Where
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/eureka/ApolloEurekaClientConfig.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/eureka/ApolloEurekaClientConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
eureka
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
eureka
;
import
com.google.common.base.Splitter
;
import
com.google.common.base.Splitter
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.ctrip.apollo.biz.entity.ServerConfig
;
import
com.ctrip.
framework.
apollo.biz.entity.ServerConfig
;
import
com.ctrip.apollo.biz.repository.ServerConfigRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ServerConfigRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.netflix.eureka.EurekaClientConfigBean
;
import
org.springframework.cloud.netflix.eureka.EurekaClientConfigBean
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/message/DatabaseMessageSender.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/message/DatabaseMessageSender.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseMessageRepository
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/message/MessageListener.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/message/MessageListener.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/message/MessageSender.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/message/MessageSender.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/message/ReleaseMessageScanner.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/message/ReleaseMessageScanner.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.apollo.core.utils.ApolloThreadFactory
;
import
com.ctrip.
framework.
apollo.core.utils.ApolloThreadFactory
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/message/Topics.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/message/Topics.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/AppNamespaceRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/AppNamespaceRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/AppRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/AppRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -6,7 +6,7 @@ import org.springframework.data.jpa.repository.Query;
...
@@ -6,7 +6,7 @@ import org.springframework.data.jpa.repository.Query;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
public
interface
AppRepository
extends
PagingAndSortingRepository
<
App
,
Long
>
{
public
interface
AppRepository
extends
PagingAndSortingRepository
<
App
,
Long
>
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/AuditRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/AuditRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -6,7 +6,7 @@ import org.springframework.data.jpa.repository.Query;
...
@@ -6,7 +6,7 @@ import org.springframework.data.jpa.repository.Query;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
public
interface
AuditRepository
extends
PagingAndSortingRepository
<
Audit
,
Long
>
{
public
interface
AuditRepository
extends
PagingAndSortingRepository
<
Audit
,
Long
>
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ClusterRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/ClusterRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.
framework.
apollo.biz.entity.Cluster
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/CommitRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/CommitRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
com.ctrip.apollo.biz.entity.Commit
;
import
com.ctrip.
framework.
apollo.biz.entity.Commit
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ItemRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/ItemRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
public
interface
ItemRepository
extends
PagingAndSortingRepository
<
Item
,
Long
>
{
public
interface
ItemRepository
extends
PagingAndSortingRepository
<
Item
,
Long
>
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/NamespaceRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/NamespaceRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
public
interface
NamespaceRepository
extends
PagingAndSortingRepository
<
Namespace
,
Long
>
{
public
interface
NamespaceRepository
extends
PagingAndSortingRepository
<
Namespace
,
Long
>
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/PrivilegeRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/PrivilegeRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
com.ctrip.apollo.biz.entity.Privilege
;
import
com.ctrip.
framework.
apollo.biz.entity.Privilege
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ReleaseMessageRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/ReleaseMessageRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ReleaseRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/ReleaseRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
java.util.List
;
import
java.util.List
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/repository/ServerConfigRepository.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/repository/ServerConfigRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
com.ctrip.apollo.biz.entity.ServerConfig
;
import
com.ctrip.
framework.
apollo.biz.entity.ServerConfig
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
import
org.springframework.data.repository.PagingAndSortingRepository
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/AdminService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/AdminService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
@Service
@Service
public
class
AdminService
{
public
class
AdminService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/AppNamespaceService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/AppNamespaceService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.google.common.base.Preconditions
;
import
com.google.common.base.Preconditions
;
...
@@ -9,13 +9,13 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -9,13 +9,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
@Service
@Service
public
class
AppNamespaceService
{
public
class
AppNamespaceService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/AppService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/AppService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -9,11 +9,11 @@ import org.springframework.data.domain.Pageable;
...
@@ -9,11 +9,11 @@ import org.springframework.data.domain.Pageable;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.repository.AppRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
@Service
@Service
public
class
AppService
{
public
class
AppService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/AuditService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/AuditService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -6,8 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -6,8 +6,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.repository.AuditRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AuditRepository
;
@Service
@Service
public
class
AuditService
{
public
class
AuditService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ClusterService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/ClusterService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -8,12 +8,13 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -8,12 +8,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.framework.apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.framework.apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.repository.ClusterRepository
;
import
com.ctrip.framework.apollo.biz.repository.ClusterRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.framework.apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.framework.apollo.core.exception.ServiceException
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
@Service
@Service
...
@@ -55,7 +56,7 @@ public class ClusterService {
...
@@ -55,7 +56,7 @@ public class ClusterService {
Cluster
cluster
=
clusterRepository
.
save
(
entity
);
Cluster
cluster
=
clusterRepository
.
save
(
entity
);
auditService
.
audit
(
Cluster
.
class
.
getSimpleName
(),
cluster
.
getId
(),
Audit
.
OP
.
INSERT
,
auditService
.
audit
(
Cluster
.
class
.
getSimpleName
(),
cluster
.
getId
(),
Audit
.
OP
.
INSERT
,
cluster
.
getDataChangeCreatedBy
());
cluster
.
getDataChangeCreatedBy
());
return
cluster
;
return
cluster
;
}
}
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/CommitService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/CommitService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.ctrip.apollo.biz.entity.Commit
;
import
com.ctrip.
framework.
apollo.biz.entity.Commit
;
import
com.ctrip.apollo.biz.repository.CommitRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.CommitRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ConfigService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/ConfigService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ItemService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/ItemService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -7,13 +7,13 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -7,13 +7,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.repository.ItemRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ItemRepository
;
import
com.ctrip.apollo.biz.repository.NamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.NamespaceRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
@Service
@Service
public
class
ItemService
{
public
class
ItemService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ItemSetService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/ItemSetService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
import
com.ctrip.apollo.biz.repository.ItemRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ItemRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
@Service
@Service
public
class
ItemSetService
{
public
class
ItemSetService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/NamespaceService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/NamespaceService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -8,12 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -8,12 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.repository.NamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.NamespaceRepository
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
@Service
@Service
public
class
NamespaceService
{
public
class
NamespaceService
{
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/PrivilegeService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/PrivilegeService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Privilege
;
import
com.ctrip.
framework.
apollo.biz.entity.Privilege
;
import
com.ctrip.apollo.biz.repository.PrivilegeRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.PrivilegeRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/service/ReleaseService.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/service/ReleaseService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Item
;
import
com.ctrip.
framework.
apollo.biz.entity.Item
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.repository.ItemRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ItemRepository
;
import
com.ctrip.apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.apollo.biz.utils.ReleaseKeyGenerator
;
import
com.ctrip.
framework.
apollo.biz.utils.ReleaseKeyGenerator
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/utils/EntityManagerUtil.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/utils/EntityManagerUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
utils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-biz/src/main/java/com/ctrip/apollo/biz/utils/ReleaseKeyGenerator.java
→
apollo-biz/src/main/java/com/ctrip/
framework/
apollo/biz/utils/ReleaseKeyGenerator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
utils
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.core.utils.ByteUtil
;
import
com.ctrip.
framework.
apollo.core.utils.ByteUtil
;
import
com.ctrip.apollo.core.utils.MachineUtil
;
import
com.ctrip.
framework.
apollo.core.utils.MachineUtil
;
import
java.security.SecureRandom
;
import
java.security.SecureRandom
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
...
@@ -32,7 +32,7 @@ public class ReleaseKeyGenerator {
...
@@ -32,7 +32,7 @@ public class ReleaseKeyGenerator {
ByteUtil
.
toHexString
(
ByteUtil
.
toHexString
(
toByteArray
(
Objects
.
hash
(
namespace
.
getAppId
(),
namespace
.
getClusterName
(),
toByteArray
(
Objects
.
hash
(
namespace
.
getAppId
(),
namespace
.
getClusterName
(),
namespace
.
getNamespaceName
()),
MachineUtil
.
getMachineIdentifier
(),
namespace
.
getNamespaceName
()),
MachineUtil
.
getMachineIdentifier
(),
releaseCounter
.
incrementAndGet
()));
releaseCounter
.
incrementAndGet
()));
return
KEY_JOINER
.
join
(
TIMESTAMP_FORMAT
.
format
(
new
Date
()),
hexIdString
);
return
KEY_JOINER
.
join
(
TIMESTAMP_FORMAT
.
format
(
new
Date
()),
hexIdString
);
}
}
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/AllTests.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
;
import
com.ctrip.apollo.biz.message.DatabaseMessageSenderTest
;
import
com.ctrip.
framework.
apollo.biz.message.DatabaseMessageSenderTest
;
import
com.ctrip.apollo.biz.repository.AppNamespaceRepositoryTest
;
import
com.ctrip.
framework.
apollo.biz.repository.AppNamespaceRepositoryTest
;
import
com.ctrip.apollo.biz.repository.AppRepositoryTest
;
import
com.ctrip.
framework.
apollo.biz.repository.AppRepositoryTest
;
import
com.ctrip.apollo.biz.service.AdminServiceTest
;
import
com.ctrip.
framework.
apollo.biz.service.AdminServiceTest
;
import
com.ctrip.apollo.biz.service.AdminServiceTransactionTest
;
import
com.ctrip.
framework.
apollo.biz.service.AdminServiceTransactionTest
;
import
com.ctrip.apollo.biz.service.ConfigServiceTest
;
import
com.ctrip.
framework.
apollo.biz.service.ConfigServiceTest
;
import
com.ctrip.apollo.biz.service.PrivilegeServiceTest
;
import
com.ctrip.
framework.
apollo.biz.service.PrivilegeServiceTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/BizTestConfiguration.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/BizTestConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@ComponentScan
(
basePackages
=
"com.ctrip.apollo.biz"
)
@ComponentScan
(
basePackages
=
"com.ctrip.
framework.
apollo.biz"
)
public
class
BizTestConfiguration
{
public
class
BizTestConfiguration
{
}
}
apollo-biz/src/test/java/com/ctrip/apollo/biz/eureka/ApolloEurekaClientConfigTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/eureka/ApolloEurekaClientConfigTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
eureka
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
eureka
;
import
com.ctrip.apollo.biz.entity.ServerConfig
;
import
com.ctrip.
framework.
apollo.biz.entity.ServerConfig
;
import
com.ctrip.apollo.biz.repository.ServerConfigRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ServerConfigRepository
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/message/DatabaseMessageSenderTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/message/DatabaseMessageSenderTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseMessageRepository
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/message/ReleaseMessageScannerTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/message/ReleaseMessageScannerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
message
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
message
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseMessageRepository
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/repository/AppNamespaceRepositoryTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/repository/AppNamespaceRepositoryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/repository/AppRepositoryTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/repository/AppRepositoryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
repository
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
repository
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -9,8 +9,8 @@ import org.springframework.test.annotation.Rollback;
...
@@ -9,8 +9,8 @@ import org.springframework.test.annotation.Rollback;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/AdminServiceTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/service/AdminServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,14 +12,14 @@ import org.springframework.test.annotation.Rollback;
...
@@ -12,14 +12,14 @@ import org.springframework.test.annotation.Rollback;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.entity.Audit
;
import
com.ctrip.
framework.
apollo.biz.entity.Audit
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.
framework.
apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.repository.AppRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppRepository
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/AdminServiceTransactionTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/service/AdminServiceTransactionTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -16,12 +16,12 @@ import org.springframework.test.context.transaction.AfterTransaction;
...
@@ -16,12 +16,12 @@ import org.springframework.test.context.transaction.AfterTransaction;
import
org.springframework.test.context.transaction.BeforeTransaction
;
import
org.springframework.test.context.transaction.BeforeTransaction
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppNamespaceRepository
;
import
com.ctrip.apollo.biz.repository.AppRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.AppRepository
;
import
com.ctrip.apollo.biz.repository.ClusterRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ClusterRepository
;
import
com.ctrip.apollo.biz.repository.NamespaceRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.NamespaceRepository
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/ClusterServiceTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/service/ClusterServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -10,9 +10,9 @@ import org.springframework.test.annotation.Rollback;
...
@@ -10,9 +10,9 @@ import org.springframework.test.annotation.Rollback;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/ConfigServiceTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/service/ConfigServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.repository.ReleaseRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseRepository
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/service/PrivilegeServiceTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/service/PrivilegeServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,11 +12,11 @@ import org.springframework.test.annotation.Rollback;
...
@@ -12,11 +12,11 @@ import org.springframework.test.annotation.Rollback;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ctrip.apollo.biz.BizTestConfiguration
;
import
com.ctrip.
framework.
apollo.biz.BizTestConfiguration
;
import
com.ctrip.apollo.biz.entity.App
;
import
com.ctrip.
framework.
apollo.biz.entity.App
;
import
com.ctrip.apollo.biz.entity.Cluster
;
import
com.ctrip.
framework.
apollo.biz.entity.Cluster
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
com.ctrip.apollo.biz.entity.Privilege
;
import
com.ctrip.
framework.
apollo.biz.entity.Privilege
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
@SpringApplicationConfiguration
(
classes
=
BizTestConfiguration
.
class
)
...
...
apollo-biz/src/test/java/com/ctrip/apollo/biz/utils/ReleaseKeyGeneratorTest.java
→
apollo-biz/src/test/java/com/ctrip/
framework/
apollo/biz/utils/ReleaseKeyGeneratorTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
biz
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
biz
.
utils
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.ctrip.apollo.biz.entity.Namespace
;
import
com.ctrip.
framework.
apollo.biz.entity.Namespace
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
...
apollo-buildtools/src/main/java/com/ctrip/apollo/cat/NullClientConfigManager.java
→
apollo-buildtools/src/main/java/com/ctrip/
framework/
apollo/cat/NullClientConfigManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
cat
;
package
com
.
ctrip
.
framework
.
apollo
.
cat
;
import
java.io.File
;
import
java.io.File
;
import
java.util.List
;
import
java.util.List
;
...
@@ -54,4 +54,4 @@ public class NullClientConfigManager implements ClientConfigManager{
...
@@ -54,4 +54,4 @@ public class NullClientConfigManager implements ClientConfigManager{
return
0
;
return
0
;
}
}
}
}
\ No newline at end of file
apollo-buildtools/src/main/java/com/ctrip/apollo/cat/NullLoggerManager.java
→
apollo-buildtools/src/main/java/com/ctrip/
framework/
apollo/cat/NullLoggerManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
cat
;
package
com
.
ctrip
.
framework
.
apollo
.
cat
;
import
org.codehaus.plexus.logging.console.ConsoleLoggerManager
;
import
org.codehaus.plexus.logging.console.ConsoleLoggerManager
;
...
...
apollo-buildtools/src/main/java/com/ctrip/apollo/cat/NullMessageManager.java
→
apollo-buildtools/src/main/java/com/ctrip/
framework/
apollo/cat/NullMessageManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
cat
;
package
com
.
ctrip
.
framework
.
apollo
.
cat
;
import
java.io.IOException
;
import
java.io.IOException
;
...
...
apollo-buildtools/src/main/java/com/ctrip/apollo/cat/NullMessageProducer.java
→
apollo-buildtools/src/main/java/com/ctrip/
framework/
apollo/cat/NullMessageProducer.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
cat
;
package
com
.
ctrip
.
framework
.
apollo
.
cat
;
import
java.util.Map
;
import
java.util.Map
;
...
...
apollo-buildtools/src/main/java/com/ctrip/apollo/cat/NullTransportManager.java
→
apollo-buildtools/src/main/java/com/ctrip/
framework/
apollo/cat/NullTransportManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
cat
;
package
com
.
ctrip
.
framework
.
apollo
.
cat
;
import
com.dianping.cat.message.io.MessageSender
;
import
com.dianping.cat.message.io.MessageSender
;
import
com.dianping.cat.message.io.TransportManager
;
import
com.dianping.cat.message.io.TransportManager
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/Config.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/Config.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/ConfigChangeListener.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/ConfigChangeListener.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/ConfigService.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/ConfigService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.internals.ConfigManager
;
import
com.ctrip.
framework.
apollo.internals.ConfigManager
;
import
com.ctrip.apollo.spi.ConfigFactory
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactory
;
import
com.ctrip.apollo.spi.ConfigRegistry
;
import
com.ctrip.
framework.
apollo.spi.ConfigRegistry
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.codehaus.plexus.PlexusContainer
;
import
org.codehaus.plexus.PlexusContainer
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/build/ComponentConfigurator.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/build/ComponentConfigurator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
build
;
package
com
.
ctrip
.
framework
.
apollo
.
build
;
import
com.ctrip.apollo.internals.ConfigServiceLocator
;
import
com.ctrip.
framework.
apollo.internals.ConfigServiceLocator
;
import
com.ctrip.apollo.internals.DefaultConfigManager
;
import
com.ctrip.
framework.
apollo.internals.DefaultConfigManager
;
import
com.ctrip.apollo.spi.DefaultConfigFactory
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigFactory
;
import
com.ctrip.apollo.spi.DefaultConfigFactoryManager
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigFactoryManager
;
import
com.ctrip.apollo.spi.DefaultConfigRegistry
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigRegistry
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.http.HttpUtil
;
import
com.ctrip.
framework.
apollo.util.http.HttpUtil
;
import
org.unidal.lookup.configuration.AbstractResourceConfigurator
;
import
org.unidal.lookup.configuration.AbstractResourceConfigurator
;
import
org.unidal.lookup.configuration.Component
;
import
org.unidal.lookup.configuration.Component
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/enums/PropertyChangeType.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/enums/PropertyChangeType.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
enums
;
package
com
.
ctrip
.
framework
.
apollo
.
enums
;
/**
/**
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/AbstractConfig.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/AbstractConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Objects
;
import
com.google.common.base.Objects
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.ConfigChangeListener
;
import
com.ctrip.
framework.
apollo.ConfigChangeListener
;
import
com.ctrip.apollo.enums.PropertyChangeType
;
import
com.ctrip.
framework.
apollo.enums.PropertyChangeType
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -108,7 +108,7 @@ public abstract class AbstractConfig implements Config {
...
@@ -108,7 +108,7 @@ public abstract class AbstractConfig implements Config {
for
(
String
newKey
:
newKeys
)
{
for
(
String
newKey
:
newKeys
)
{
changes
changes
.
add
(
new
ConfigChange
(
namespace
,
newKey
,
null
,
current
.
getProperty
(
newKey
),
.
add
(
new
ConfigChange
(
namespace
,
newKey
,
null
,
current
.
getProperty
(
newKey
),
PropertyChangeType
.
ADDED
));
PropertyChangeType
.
ADDED
));
}
}
for
(
String
removedKey
:
removedKeys
)
{
for
(
String
removedKey
:
removedKeys
)
{
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/AbstractConfigRepository.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/AbstractConfigRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/ConfigManager.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/ConfigManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/ConfigRepository.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/ConfigRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
java.util.Properties
;
import
java.util.Properties
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/ConfigServiceLocator.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/ConfigServiceLocator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
...
@@ -7,12 +7,12 @@ import com.google.common.escape.Escaper;
...
@@ -7,12 +7,12 @@ import com.google.common.escape.Escaper;
import
com.google.common.net.UrlEscapers
;
import
com.google.common.net.UrlEscapers
;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.core.utils.ApolloThreadFactory
;
import
com.ctrip.
framework.
apollo.core.utils.ApolloThreadFactory
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.http.HttpRequest
;
import
com.ctrip.
framework.
apollo.util.http.HttpRequest
;
import
com.ctrip.apollo.util.http.HttpResponse
;
import
com.ctrip.
framework.
apollo.util.http.HttpResponse
;
import
com.ctrip.apollo.util.http.HttpUtil
;
import
com.ctrip.
framework.
apollo.util.http.HttpUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/DefaultConfig.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/DefaultConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.ctrip.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.
framework.
apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.apollo.enums.PropertyChangeType
;
import
com.ctrip.
framework.
apollo.enums.PropertyChangeType
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -20,6 +20,7 @@ import java.util.Objects;
...
@@ -20,6 +20,7 @@ import java.util.Objects;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
*/
*/
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/DefaultConfigManager.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/DefaultConfigManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.spi.ConfigFactory
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactory
;
import
com.ctrip.apollo.spi.ConfigFactoryManager
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactoryManager
;
import
org.unidal.lookup.annotation.Inject
;
import
org.unidal.lookup.annotation.Inject
;
import
org.unidal.lookup.annotation.Named
;
import
org.unidal.lookup.annotation.Named
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/LocalFileConfigRepository.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/LocalFileConfigRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Preconditions
;
import
com.google.common.base.Preconditions
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/RemoteConfigRepository.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/RemoteConfigRepository.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
...
@@ -7,18 +7,18 @@ import com.google.common.collect.Maps;
...
@@ -7,18 +7,18 @@ import com.google.common.collect.Maps;
import
com.google.common.escape.Escaper
;
import
com.google.common.escape.Escaper
;
import
com.google.common.net.UrlEscapers
;
import
com.google.common.net.UrlEscapers
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.core.schedule.ExponentialSchedulePolicy
;
import
com.ctrip.
framework.
apollo.core.schedule.ExponentialSchedulePolicy
;
import
com.ctrip.apollo.core.schedule.SchedulePolicy
;
import
com.ctrip.
framework.
apollo.core.schedule.SchedulePolicy
;
import
com.ctrip.apollo.core.utils.ApolloThreadFactory
;
import
com.ctrip.
framework.
apollo.core.utils.ApolloThreadFactory
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.ctrip.apollo.util.http.HttpRequest
;
import
com.ctrip.
framework.
apollo.util.http.HttpRequest
;
import
com.ctrip.apollo.util.http.HttpResponse
;
import
com.ctrip.
framework.
apollo.util.http.HttpResponse
;
import
com.ctrip.apollo.util.http.HttpUtil
;
import
com.ctrip.
framework.
apollo.util.http.HttpUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/RepositoryChangeListener.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/RepositoryChangeListener.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
java.util.Properties
;
import
java.util.Properties
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/internals/SimpleConfig.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/internals/SimpleConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Function
;
import
com.google.common.base.Function
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/model/ConfigChange.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/model/ConfigChange.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
model
;
package
com
.
ctrip
.
framework
.
apollo
.
model
;
import
com.google.common.base.MoreObjects
;
import
com.google.common.base.MoreObjects
;
import
com.ctrip.apollo.enums.PropertyChangeType
;
import
com.ctrip.
framework.
apollo.enums.PropertyChangeType
;
/**
/**
* Holds the information for a config change.
* Holds the information for a config change.
...
...
apollo-client/src/main/java/com/ctrip/apollo/model/ConfigChangeEvent.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/model/ConfigChangeEvent.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
model
;
package
com
.
ctrip
.
framework
.
apollo
.
model
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/ConfigFactory.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/ConfigFactory.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/ConfigFactoryManager.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/ConfigFactoryManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/ConfigRegistry.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/ConfigRegistry.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
/**
/**
* The manually config registry, use with caution!
* The manually config registry, use with caution!
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/DefaultConfigFactory.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/DefaultConfigFactory.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.
framework.
apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.apollo.internals.DefaultConfig
;
import
com.ctrip.
framework.
apollo.internals.DefaultConfig
;
import
com.ctrip.apollo.internals.LocalFileConfigRepository
;
import
com.ctrip.
framework.
apollo.internals.LocalFileConfigRepository
;
import
com.ctrip.apollo.internals.RemoteConfigRepository
;
import
com.ctrip.
framework.
apollo.internals.RemoteConfigRepository
;
import
com.ctrip.apollo.util.ExceptionUtil
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtil
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Message
;
import
com.dianping.cat.message.Transaction
;
import
com.dianping.cat.message.Transaction
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/DefaultConfigFactoryManager.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/DefaultConfigFactoryManager.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/spi/DefaultConfigRegistry.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/spi/DefaultConfigRegistry.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/util/ConfigUtil.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/util/ConfigUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
;
package
com
.
ctrip
.
framework
.
apollo
.
util
;
import
com.google.common.base.Preconditions
;
import
com.google.common.base.Preconditions
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.MetaDomainConsts
;
import
com.ctrip.
framework.
apollo.core.MetaDomainConsts
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.enums.EnvUtils
;
import
com.ctrip.
framework.
apollo.core.enums.EnvUtils
;
import
com.ctrip.framework.foundation.Foundation
;
import
com.ctrip.framework.foundation.Foundation
;
import
org.unidal.lookup.annotation.Named
;
import
org.unidal.lookup.annotation.Named
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/util/ExceptionUtil.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/util/ExceptionUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
;
package
com
.
ctrip
.
framework
.
apollo
.
util
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
...
...
apollo-client/src/main/java/com/ctrip/apollo/util/http/HttpRequest.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/util/http/HttpRequest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
.
http
;
package
com
.
ctrip
.
framework
.
apollo
.
util
.
http
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/util/http/HttpResponse.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/util/http/HttpResponse.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
.
http
;
package
com
.
ctrip
.
framework
.
apollo
.
util
.
http
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-client/src/main/java/com/ctrip/apollo/util/http/HttpUtil.java
→
apollo-client/src/main/java/com/ctrip/
framework/
apollo/util/http/HttpUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
.
http
;
package
com
.
ctrip
.
framework
.
apollo
.
util
.
http
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Function
;
import
com.google.common.base.Function
;
import
com.google.common.io.BaseEncoding
;
import
com.google.common.io.BaseEncoding
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
org.unidal.helper.Files
;
import
org.unidal.helper.Files
;
import
org.unidal.lookup.annotation.Inject
;
import
org.unidal.lookup.annotation.Inject
;
...
...
apollo-client/src/main/resources/META-INF/plexus/components.xml
View file @
007a3ed7
<plexus>
<plexus>
<components>
<components>
<component>
<component>
<role>
com.ctrip.apollo.internals.ConfigManager
</role>
<role>
com.ctrip.
framework.
apollo.internals.ConfigManager
</role>
<implementation>
com.ctrip.apollo.internals.DefaultConfigManager
</implementation>
<implementation>
com.ctrip.
framework.
apollo.internals.DefaultConfigManager
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
<role>
com.ctrip.apollo.spi.ConfigFactoryManager
</role>
<role>
com.ctrip.
framework.
apollo.spi.ConfigFactoryManager
</role>
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.spi.ConfigFactory
</role>
<role>
com.ctrip.
framework.
apollo.spi.ConfigFactory
</role>
<implementation>
com.ctrip.apollo.spi.DefaultConfigFactory
</implementation>
<implementation>
com.ctrip.
framework.
apollo.spi.DefaultConfigFactory
</implementation>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.spi.ConfigRegistry
</role>
<role>
com.ctrip.
framework.
apollo.spi.ConfigRegistry
</role>
<implementation>
com.ctrip.apollo.spi.DefaultConfigRegistry
</implementation>
<implementation>
com.ctrip.
framework.
apollo.spi.DefaultConfigRegistry
</implementation>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.spi.ConfigFactoryManager
</role>
<role>
com.ctrip.
framework.
apollo.spi.ConfigFactoryManager
</role>
<implementation>
com.ctrip.apollo.spi.DefaultConfigFactoryManager
</implementation>
<implementation>
com.ctrip.
framework.
apollo.spi.DefaultConfigFactoryManager
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
<role>
com.ctrip.apollo.spi.ConfigRegistry
</role>
<role>
com.ctrip.
framework.
apollo.spi.ConfigRegistry
</role>
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.util.ConfigUtil
</role>
<role>
com.ctrip.
framework.
apollo.util.ConfigUtil
</role>
<implementation>
com.ctrip.apollo.util.ConfigUtil
</implementation>
<implementation>
com.ctrip.
framework.
apollo.util.ConfigUtil
</implementation>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.internals.ConfigServiceLocator
</role>
<role>
com.ctrip.
framework.
apollo.internals.ConfigServiceLocator
</role>
<implementation>
com.ctrip.apollo.internals.ConfigServiceLocator
</implementation>
<implementation>
com.ctrip.
framework.
apollo.internals.ConfigServiceLocator
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
<role>
com.ctrip.apollo.util.http.HttpUtil
</role>
<role>
com.ctrip.
framework.
apollo.util.http.HttpUtil
</role>
</requirement>
</requirement>
<requirement>
<requirement>
<role>
com.ctrip.apollo.util.ConfigUtil
</role>
<role>
com.ctrip.
framework.
apollo.util.ConfigUtil
</role>
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
<component>
<component>
<role>
com.ctrip.apollo.util.http.HttpUtil
</role>
<role>
com.ctrip.
framework.
apollo.util.http.HttpUtil
</role>
<implementation>
com.ctrip.apollo.util.http.HttpUtil
</implementation>
<implementation>
com.ctrip.
framework.
apollo.util.http.HttpUtil
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
<role>
com.ctrip.apollo.util.ConfigUtil
</role>
<role>
com.ctrip.
framework.
apollo.util.ConfigUtil
</role>
</requirement>
</requirement>
</requirements>
</requirements>
</component>
</component>
...
...
apollo-client/src/test/java/com/ctrip/apollo/AllTests.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.integration.ConfigIntegrationTest
;
import
com.ctrip.
framework.
apollo.integration.ConfigIntegrationTest
;
import
com.ctrip.apollo.internals.DefaultConfigManagerTest
;
import
com.ctrip.
framework.
apollo.internals.DefaultConfigManagerTest
;
import
com.ctrip.apollo.internals.DefaultConfigTest
;
import
com.ctrip.
framework.
apollo.internals.DefaultConfigTest
;
import
com.ctrip.apollo.internals.LocalFileConfigRepositoryTest
;
import
com.ctrip.
framework.
apollo.internals.LocalFileConfigRepositoryTest
;
import
com.ctrip.apollo.internals.RemoteConfigRepositoryTest
;
import
com.ctrip.
framework.
apollo.internals.RemoteConfigRepositoryTest
;
import
com.ctrip.apollo.internals.SimpleConfigTest
;
import
com.ctrip.
framework.
apollo.internals.SimpleConfigTest
;
import
com.ctrip.apollo.spi.DefaultConfigFactoryManagerTest
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigFactoryManagerTest
;
import
com.ctrip.apollo.spi.DefaultConfigFactoryTest
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigFactoryTest
;
import
com.ctrip.apollo.spi.DefaultConfigRegistryTest
;
import
com.ctrip.
framework.
apollo.spi.DefaultConfigRegistryTest
;
import
com.ctrip.apollo.util.ExceptionUtilTest
;
import
com.ctrip.
framework.
apollo.util.ExceptionUtilTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/BaseIntegrationTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/BaseIntegrationTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Charsets
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.io.Files
;
import
com.google.common.io.Files
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ctrip.apollo.ConfigService
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.framework.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.framework.apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
org.eclipse.jetty.server.Request
;
import
org.eclipse.jetty.server.Request
;
import
org.eclipse.jetty.server.Server
;
import
org.eclipse.jetty.server.Server
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/ConfigServiceTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/ConfigServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.internals.AbstractConfig
;
import
com.ctrip.
framework.
apollo.internals.AbstractConfig
;
import
com.ctrip.apollo.spi.ConfigFactory
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactory
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/integration/ConfigIntegrationTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/integration/ConfigIntegrationTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
integration
;
package
com
.
ctrip
.
framework
.
apollo
.
integration
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
...
@@ -6,15 +6,15 @@ import com.google.common.collect.Lists;
...
@@ -6,15 +6,15 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.ctrip.apollo.BaseIntegrationTest
;
import
com.ctrip.
framework.
apollo.BaseIntegrationTest
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.ConfigChangeListener
;
import
com.ctrip.
framework.
apollo.ConfigChangeListener
;
import
com.ctrip.apollo.ConfigService
;
import
com.ctrip.
framework.
apollo.ConfigService
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.
framework.
apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
org.eclipse.jetty.server.Request
;
import
org.eclipse.jetty.server.Request
;
import
org.eclipse.jetty.server.handler.AbstractHandler
;
import
org.eclipse.jetty.server.handler.AbstractHandler
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/internals/DefaultConfigManagerTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/internals/DefaultConfigManagerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.spi.ConfigFactory
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactory
;
import
com.ctrip.apollo.spi.ConfigFactoryManager
;
import
com.ctrip.
framework.
apollo.spi.ConfigFactoryManager
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/internals/DefaultConfigTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/internals/DefaultConfigTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Charsets
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.io.Files
;
import
com.google.common.io.Files
;
import
com.ctrip.apollo.ConfigChangeListener
;
import
com.ctrip.
framework.
apollo.ConfigChangeListener
;
import
com.ctrip.apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.
framework.
apollo.core.utils.ClassLoaderUtil
;
import
com.ctrip.apollo.enums.PropertyChangeType
;
import
com.ctrip.
framework.
apollo.enums.PropertyChangeType
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Before
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/internals/LocalFileConfigRepositoryTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/internals/LocalFileConfigRepositoryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Charsets
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.io.Files
;
import
com.google.common.io.Files
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Before
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/internals/RemoteConfigRepositoryTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/internals/RemoteConfigRepositoryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.google.common.util.concurrent.SettableFuture
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.util.ConfigUtil
;
import
com.ctrip.
framework.
apollo.util.ConfigUtil
;
import
com.ctrip.apollo.util.http.HttpRequest
;
import
com.ctrip.
framework.
apollo.util.http.HttpRequest
;
import
com.ctrip.apollo.util.http.HttpResponse
;
import
com.ctrip.
framework.
apollo.util.http.HttpResponse
;
import
com.ctrip.apollo.util.http.HttpUtil
;
import
com.ctrip.
framework.
apollo.util.http.HttpUtil
;
import
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
;
import
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
;
import
org.junit.Before
;
import
org.junit.Before
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/internals/SimpleConfigTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/internals/SimpleConfigTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
internals
;
package
com
.
ctrip
.
framework
.
apollo
.
internals
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.ConfigChangeListener
;
import
com.ctrip.
framework.
apollo.ConfigChangeListener
;
import
com.ctrip.apollo.enums.PropertyChangeType
;
import
com.ctrip.
framework.
apollo.enums.PropertyChangeType
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/spi/DefaultConfigFactoryManagerTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/spi/DefaultConfigFactoryManagerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/spi/DefaultConfigFactoryTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/spi/DefaultConfigFactoryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.internals.DefaultConfig
;
import
com.ctrip.
framework.
apollo.internals.DefaultConfig
;
import
com.ctrip.apollo.internals.LocalFileConfigRepository
;
import
com.ctrip.
framework.
apollo.internals.LocalFileConfigRepository
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/spi/DefaultConfigRegistryTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/spi/DefaultConfigRegistryTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
spi
;
package
com
.
ctrip
.
framework
.
apollo
.
spi
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/java/com/ctrip/apollo/util/ExceptionUtilTest.java
→
apollo-client/src/test/java/com/ctrip/
framework/
apollo/util/ExceptionUtilTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
util
;
package
com
.
ctrip
.
framework
.
apollo
.
util
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-client/src/test/resources/META-INF/plexus/plexus.xml
View file @
007a3ed7
...
@@ -2,17 +2,17 @@
...
@@ -2,17 +2,17 @@
<components>
<components>
<component>
<component>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<implementation>
com.ctrip.apollo.cat.NullClientConfigManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullClientConfigManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<implementation>
com.ctrip.apollo.cat.NullTransportManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullTransportManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageManager
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.MessageProducer
</role>
<role>
com.dianping.cat.message.MessageProducer
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageProducer
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageProducer
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</component>
</component>
<component>
<component>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<implementation>
com.ctrip.apollo.cat.NullLoggerManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullLoggerManager
</implementation>
</implementation>
</component>
</component>
</components>
</components>
</plexus>
</plexus>
\ No newline at end of file
apollo-client/src/test/resources/log4j2.xml
View file @
007a3ed7
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</Async>
</Async>
</appenders>
</appenders>
<loggers>
<loggers>
<logger
name=
"com.ctrip.apollo"
additivity=
"false"
level=
"trace"
>
<logger
name=
"com.ctrip.
framework.
apollo"
additivity=
"false"
level=
"trace"
>
<AppenderRef
ref=
"Async"
level=
"DEBUG"
/>
<AppenderRef
ref=
"Async"
level=
"DEBUG"
/>
</logger>
</logger>
<root
level=
"INFO"
>
<root
level=
"INFO"
>
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/ApolloCommonConfig.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/ApolloCommonConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
;
package
com
.
ctrip
.
framework
.
apollo
.
common
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
@EnableAutoConfiguration
@EnableAutoConfiguration
@Configuration
@Configuration
@ComponentScan
(
basePackageClasses
=
com
.
ctrip
.
apollo
.
common
.
ApolloCommonConfig
.
class
)
@ComponentScan
(
basePackageClasses
=
ApolloCommonConfig
.
class
)
public
class
ApolloCommonConfig
{
public
class
ApolloCommonConfig
{
}
}
apollo-common/src/main/java/com/ctrip/apollo/common/auth/ActiveUser.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/auth/ActiveUser.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
auth
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.ElementType
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/auth/RestTemplateFactory.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/auth/RestTemplateFactory.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
auth
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
auth
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/ApolloInfoController.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/ApolloInfoController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ctrip.apollo.Apollo
;
import
com.ctrip.
framework.
apollo.Apollo
;
import
com.ctrip.framework.foundation.Foundation
;
import
com.ctrip.framework.foundation.Foundation
;
@RestController
@RestController
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/CatConfig.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/CatConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
javax.servlet.DispatcherType
;
import
javax.servlet.DispatcherType
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/CharacterEncodingFilterConfiguration.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/CharacterEncodingFilterConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
javax.servlet.DispatcherType
;
import
javax.servlet.DispatcherType
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/GlobalDefaultExceptionHandler.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/GlobalDefaultExceptionHandler.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -9,9 +9,9 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
...
@@ -9,9 +9,9 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
com.ctrip.apollo.core.exception.AbstractBaseException
;
import
com.ctrip.
framework.
apollo.core.exception.AbstractBaseException
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/HttpMessageConverterConfiguration.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/HttpMessageConverterConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.gson.GsonBuilder
;
import
com.google.gson.GsonBuilder
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/WebMvcConfig.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/WebMvcConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/controller/WebSecurityConfig.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/controller/WebSecurityConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/http/MultiResponseEntity.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/http/MultiResponseEntity.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
http
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
http
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/http/RichResponseEntity.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/http/RichResponseEntity.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
http
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
http
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/utils/BeanUtils.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/utils/BeanUtils.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
utils
;
import
java.beans.PropertyDescriptor
;
import
java.beans.PropertyDescriptor
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
...
...
apollo-common/src/main/java/com/ctrip/apollo/common/utils/ExceptionUtils.java
→
apollo-common/src/main/java/com/ctrip/
framework/
apollo/common/utils/ExceptionUtils.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
common
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
common
.
utils
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
import
java.util.Map
;
import
java.util.Map
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/ConfigServiceApplication.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/ConfigServiceApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
com.ctrip.framework.apollo.biz.ApolloBizConfig
;
import
com.ctrip.framework.apollo.common.ApolloCommonConfig
;
import
com.ctrip.framework.apollo.metaservice.ApolloMetaServiceConfig
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
import
org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter
;
import
org.springframework.boot.actuate.system.EmbeddedServerPortFileWriter
;
...
@@ -24,10 +28,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -24,10 +28,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@Configuration
@EnableTransactionManagement
@EnableTransactionManagement
@PropertySource
(
value
=
{
"classpath:configservice.properties"
})
@PropertySource
(
value
=
{
"classpath:configservice.properties"
})
@ComponentScan
(
basePackageClasses
=
{
com
.
ctrip
.
apollo
.
common
.
ApolloCommonConfig
.
class
,
@ComponentScan
(
basePackageClasses
=
{
ApolloCommonConfig
.
class
,
com
.
ctrip
.
apollo
.
biz
.
ApolloBizConfig
.
class
,
ApolloBizConfig
.
class
,
com
.
ctrip
.
apollo
.
configservice
.
ConfigServiceApplication
.
class
,
ConfigServiceApplication
.
class
,
com
.
ctrip
.
apollo
.
metaservice
.
ApolloMetaServiceConfig
.
class
})
ApolloMetaServiceConfig
.
class
})
public
class
ConfigServiceApplication
{
public
class
ConfigServiceApplication
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/ConfigServiceAutoConfiguration.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/ConfigServiceAutoConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
com.ctrip.apollo.biz.message.ReleaseMessageScanner
;
import
com.ctrip.
framework.
apollo.biz.message.ReleaseMessageScanner
;
import
com.ctrip.apollo.configservice.controller.NotificationController
;
import
com.ctrip.
framework.
apollo.configservice.controller.NotificationController
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/ConfigServiceHealthIndicator.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/ConfigServiceHealthIndicator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
com.ctrip.apollo.biz.service.AppService
;
import
com.ctrip.
framework.
apollo.biz.service.AppService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.actuate.health.Health
;
import
org.springframework.boot.actuate.health.Health
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/ServletInitializer.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/ServletInitializer.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.context.web.SpringBootServletInitializer
;
import
org.springframework.boot.context.web.SpringBootServletInitializer
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/controller/ConfigController.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/controller/ConfigController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
...
@@ -8,12 +8,12 @@ import com.google.common.collect.Maps;
...
@@ -8,12 +8,12 @@ import com.google.common.collect.Maps;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.service.AppNamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.AppNamespaceService
;
import
com.ctrip.apollo.biz.service.ConfigService
;
import
com.ctrip.
framework.
apollo.biz.service.ConfigService
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/configservice/controller/NotificationController.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/configservice/controller/NotificationController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Splitter
;
import
com.google.common.base.Splitter
;
...
@@ -8,13 +8,13 @@ import com.google.common.collect.Lists;
...
@@ -8,13 +8,13 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Multimap
;
import
com.google.common.collect.Multimap
;
import
com.google.common.collect.Multimaps
;
import
com.google.common.collect.Multimaps
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.message.MessageListener
;
import
com.ctrip.
framework.
apollo.biz.message.MessageListener
;
import
com.ctrip.apollo.biz.message.Topics
;
import
com.ctrip.
framework.
apollo.biz.message.Topics
;
import
com.ctrip.apollo.biz.service.AppNamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.AppNamespaceService
;
import
com.ctrip.apollo.biz.utils.EntityManagerUtil
;
import
com.ctrip.
framework.
apollo.biz.utils.EntityManagerUtil
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/metaservice/ApolloMetaServiceConfig.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/metaservice/ApolloMetaServiceConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
metaservice
;
package
com
.
ctrip
.
framework
.
apollo
.
metaservice
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
@EnableAutoConfiguration
@EnableAutoConfiguration
@Configuration
@Configuration
@ComponentScan
(
basePackageClasses
=
com
.
ctrip
.
apollo
.
metaservice
.
ApolloMetaServiceConfig
.
class
)
@ComponentScan
(
basePackageClasses
=
ApolloMetaServiceConfig
.
class
)
public
class
ApolloMetaServiceConfig
{
public
class
ApolloMetaServiceConfig
{
}
}
apollo-configservice/src/main/java/com/ctrip/apollo/metaservice/controller/ServiceController.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/metaservice/controller/ServiceController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
metaservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
metaservice
.
controller
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.metaservice.service.DiscoveryService
;
import
com.ctrip.
framework.
apollo.metaservice.service.DiscoveryService
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.appinfo.InstanceInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
apollo-configservice/src/main/java/com/ctrip/apollo/metaservice/service/DiscoveryService.java
→
apollo-configservice/src/main/java/com/ctrip/
framework/
apollo/metaservice/service/DiscoveryService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
metaservice
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
metaservice
.
service
;
import
com.ctrip.apollo.core.ServiceNameConsts
;
import
com.ctrip.
framework.
apollo.core.ServiceNameConsts
;
import
com.dianping.cat.Cat
;
import
com.dianping.cat.Cat
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.appinfo.InstanceInfo
;
import
com.netflix.discovery.EurekaClient
;
import
com.netflix.discovery.EurekaClient
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/ConfigServiceTestConfiguration.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/ConfigServiceTestConfiguration.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
com.ctrip.apollo.common.controller.WebSecurityConfig
;
import
com.ctrip.
framework.
apollo.common.controller.WebSecurityConfig
;
import
com.ctrip.apollo.configservice.ConfigServiceApplication
;
import
com.ctrip.
framework.
apollo.configservice.ConfigServiceApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/LocalConfigServiceApplication.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/LocalConfigServiceApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/AllTests.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
;
import
com.ctrip.apollo.configservice.controller.ConfigControllerTest
;
import
com.ctrip.
framework.
apollo.configservice.controller.ConfigControllerTest
;
import
com.ctrip.apollo.configservice.controller.NotificationControllerTest
;
import
com.ctrip.
framework.
apollo.configservice.controller.NotificationControllerTest
;
import
com.ctrip.apollo.configservice.integration.ConfigControllerIntegrationTest
;
import
com.ctrip.
framework.
apollo.configservice.integration.ConfigControllerIntegrationTest
;
import
com.ctrip.apollo.configservice.integration.NotificationControllerIntegrationTest
;
import
com.ctrip.
framework.
apollo.configservice.integration.NotificationControllerIntegrationTest
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/controller/ConfigControllerTest.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/controller/ConfigControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
...
@@ -6,12 +6,12 @@ import com.google.common.collect.Lists;
...
@@ -6,12 +6,12 @@ import com.google.common.collect.Lists;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonSyntaxException
;
import
com.google.gson.JsonSyntaxException
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.entity.Release
;
import
com.ctrip.
framework.
apollo.biz.entity.Release
;
import
com.ctrip.apollo.biz.service.AppNamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.AppNamespaceService
;
import
com.ctrip.apollo.biz.service.ConfigService
;
import
com.ctrip.
framework.
apollo.biz.service.ConfigService
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -82,8 +82,8 @@ public class ConfigControllerTest {
...
@@ -82,8 +82,8 @@ public class ConfigControllerTest {
when
(
someRelease
.
getReleaseKey
()).
thenReturn
(
someServerSideNewReleaseKey
);
when
(
someRelease
.
getReleaseKey
()).
thenReturn
(
someServerSideNewReleaseKey
);
ApolloConfig
result
=
configController
.
queryConfig
(
someAppId
,
someClusterName
,
ApolloConfig
result
=
configController
.
queryConfig
(
someAppId
,
someClusterName
,
defaultNamespaceName
,
someDataCenter
,
someClientSideReleaseKey
,
defaultNamespaceName
,
someDataCenter
,
someClientSideReleaseKey
,
someResponse
);
someResponse
);
verify
(
configService
,
times
(
1
)).
findRelease
(
someAppId
,
someClusterName
,
defaultNamespaceName
);
verify
(
configService
,
times
(
1
)).
findRelease
(
someAppId
,
someClusterName
,
defaultNamespaceName
);
assertEquals
(
someAppId
,
result
.
getAppId
());
assertEquals
(
someAppId
,
result
.
getAppId
());
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/controller/NotificationControllerTest.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/controller/NotificationControllerTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
controller
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Multimap
;
import
com.google.common.collect.Multimap
;
import
com.ctrip.apollo.biz.entity.AppNamespace
;
import
com.ctrip.
framework.
apollo.biz.entity.AppNamespace
;
import
com.ctrip.apollo.biz.message.Topics
;
import
com.ctrip.
framework.
apollo.biz.message.Topics
;
import
com.ctrip.apollo.biz.service.AppNamespaceService
;
import
com.ctrip.
framework.
apollo.biz.service.AppNamespaceService
;
import
com.ctrip.apollo.biz.utils.EntityManagerUtil
;
import
com.ctrip.
framework.
apollo.biz.utils.EntityManagerUtil
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/controller/TestWebSecurityConfig.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/controller/TestWebSecurityConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/integration/AbstractBaseIntegrationTest.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/integration/AbstractBaseIntegrationTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
integration
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
integration
;
import
com.ctrip.apollo.ConfigServiceTestConfiguration
;
import
com.ctrip.
framework.
apollo.ConfigServiceTestConfiguration
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/integration/ConfigControllerIntegrationTest.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/integration/ConfigControllerIntegrationTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
integration
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
integration
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfig
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfig
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-configservice/src/test/java/com/ctrip/apollo/configservice/integration/NotificationControllerIntegrationTest.java
→
apollo-configservice/src/test/java/com/ctrip/
framework/
apollo/configservice/integration/NotificationControllerIntegrationTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
configservice
.
integration
;
package
com
.
ctrip
.
framework
.
apollo
.
configservice
.
integration
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Joiner
;
import
com.ctrip.apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.
framework.
apollo.biz.entity.ReleaseMessage
;
import
com.ctrip.apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.
framework.
apollo.biz.repository.ReleaseMessageRepository
;
import
com.ctrip.apollo.configservice.controller.NotificationController
;
import
com.ctrip.
framework.
apollo.configservice.controller.NotificationController
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ApolloConfigNotification
;
import
com.ctrip.
framework.
apollo.core.dto.ApolloConfigNotification
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-configservice/src/test/resources/META-INF/plexus/plexus.xml
View file @
007a3ed7
...
@@ -2,17 +2,17 @@
...
@@ -2,17 +2,17 @@
<components>
<components>
<component>
<component>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<implementation>
com.ctrip.apollo.cat.NullClientConfigManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullClientConfigManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<implementation>
com.ctrip.apollo.cat.NullTransportManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullTransportManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageManager
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.MessageProducer
</role>
<role>
com.dianping.cat.message.MessageProducer
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageProducer
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageProducer
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</component>
</component>
<component>
<component>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<implementation>
com.ctrip.apollo.cat.NullLoggerManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullLoggerManager
</implementation>
</implementation>
</component>
</component>
</components>
</components>
</plexus>
</plexus>
\ No newline at end of file
apollo-core/src/main/java/com/ctrip/apollo/Apollo.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/Apollo.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/ConfigConsts.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/ConfigConsts.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
;
package
com
.
ctrip
.
framework
.
apollo
.
core
;
public
interface
ConfigConsts
{
public
interface
ConfigConsts
{
String
NAMESPACE_DEFAULT
=
"application"
;
String
NAMESPACE_DEFAULT
=
"application"
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/MetaDomainConsts.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/MetaDomainConsts.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
;
package
com
.
ctrip
.
framework
.
apollo
.
core
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Properties
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.utils.ResourceUtils
;
import
com.ctrip.
framework.
apollo.core.utils.ResourceUtils
;
/**
/**
* The meta domain will load the meta server from System environment first, if not exist, will load
* The meta domain will load the meta server from System environment first, if not exist, will load
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/ServiceNameConsts.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/ServiceNameConsts.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
;
package
com
.
ctrip
.
framework
.
apollo
.
core
;
public
interface
ServiceNameConsts
{
public
interface
ServiceNameConsts
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ApolloConfig.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ApolloConfig.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
com.google.common.base.MoreObjects
;
import
com.google.common.base.MoreObjects
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ApolloConfigNotification.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ApolloConfigNotification.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/AppDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/AppDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
public
class
AppDTO
{
public
class
AppDTO
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/AppNamespaceDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/AppNamespaceDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
public
class
AppNamespaceDTO
{
public
class
AppNamespaceDTO
{
private
long
id
;
private
long
id
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ClusterDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ClusterDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
public
class
ClusterDTO
{
public
class
ClusterDTO
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ItemChangeSets.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ItemChangeSets.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ItemDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ItemDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
java.util.Date
;
import
java.util.Date
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/NamespaceDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/NamespaceDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
public
class
NamespaceDTO
{
public
class
NamespaceDTO
{
private
long
id
;
private
long
id
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ReleaseDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ReleaseDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
public
class
ReleaseDTO
{
public
class
ReleaseDTO
{
private
long
id
;
private
long
id
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/dto/ServiceDTO.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/dto/ServiceDTO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
dto
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
dto
;
import
com.google.common.base.MoreObjects
;
import
com.google.common.base.MoreObjects
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/enums/Env.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/enums/Env.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
enums
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
enums
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/enums/EnvUtils.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/enums/EnvUtils.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
enums
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
enums
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
public
final
class
EnvUtils
{
public
final
class
EnvUtils
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/exception/AbstractBaseException.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/exception/AbstractBaseException.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
exception
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
exception
;
public
abstract
class
AbstractBaseException
extends
RuntimeException
{
public
abstract
class
AbstractBaseException
extends
RuntimeException
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/exception/BadRequestException.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/exception/BadRequestException.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
exception
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
exception
;
public
class
BadRequestException
extends
AbstractBaseException
{
public
class
BadRequestException
extends
AbstractBaseException
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/exception/NotFoundException.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/exception/NotFoundException.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
exception
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
exception
;
public
class
NotFoundException
extends
AbstractBaseException
{
public
class
NotFoundException
extends
AbstractBaseException
{
/**
/**
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/exception/ServiceException.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/exception/ServiceException.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
exception
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
exception
;
public
class
ServiceException
extends
AbstractBaseException
{
public
class
ServiceException
extends
AbstractBaseException
{
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/schedule/ExponentialSchedulePolicy.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/schedule/ExponentialSchedulePolicy.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
schedule
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
schedule
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/schedule/SchedulePolicy.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/schedule/SchedulePolicy.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
schedule
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
schedule
;
/**
/**
* Schedule policy
* Schedule policy
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/ApolloThreadFactory.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/ApolloThreadFactory.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/ByteUtil.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/ByteUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
/**
/**
* @author Jason Song(song_s@ctrip.com)
* @author Jason Song(song_s@ctrip.com)
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/ClassLoaderUtil.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/ClassLoaderUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/DNSUtil.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/DNSUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.net.UnknownHostException
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/MachineUtil.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/MachineUtil.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/ResourceUtils.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/ResourceUtils.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
...
...
apollo-core/src/main/java/com/ctrip/apollo/core/utils/StringUtils.java
→
apollo-core/src/main/java/com/ctrip/
framework/
apollo/core/utils/StringUtils.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
.
utils
;
package
com
.
ctrip
.
framework
.
apollo
.
core
.
utils
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Iterator
;
import
java.util.Iterator
;
...
...
apollo-core/src/test/java/com/ctrip/apollo/core/AllTests.java
→
apollo-core/src/test/java/com/ctrip/
framework/
apollo/core/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
;
package
com
.
ctrip
.
framework
.
apollo
.
core
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.junit.runners.Suite
;
import
org.junit.runners.Suite
;
...
...
apollo-core/src/test/java/com/ctrip/apollo/core/MetaDomainTest.java
→
apollo-core/src/test/java/com/ctrip/
framework/
apollo/core/MetaDomainTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
core
;
package
com
.
ctrip
.
framework
.
apollo
.
core
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-demo/src/main/java/ApolloConfigDemo.java
View file @
007a3ed7
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.ctrip.apollo.Config
;
import
com.ctrip.
framework.
apollo.Config
;
import
com.ctrip.apollo.ConfigChangeListener
;
import
com.ctrip.
framework.
apollo.ConfigChangeListener
;
import
com.ctrip.apollo.ConfigService
;
import
com.ctrip.
framework.
apollo.ConfigService
;
import
com.ctrip.apollo.model.ConfigChange
;
import
com.ctrip.
framework.
apollo.model.ConfigChange
;
import
com.ctrip.apollo.model.ConfigChangeEvent
;
import
com.ctrip.
framework.
apollo.model.ConfigChangeEvent
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-demo/src/main/resources/log4j2.xml
View file @
007a3ed7
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</Async>
</Async>
</appenders>
</appenders>
<loggers>
<loggers>
<logger
name=
"com.ctrip.apollo"
additivity=
"false"
level=
"trace"
>
<logger
name=
"com.ctrip.
framework.
apollo"
additivity=
"false"
level=
"trace"
>
<AppenderRef
ref=
"Async"
level=
"DEBUG"
/>
<AppenderRef
ref=
"Async"
level=
"DEBUG"
/>
</logger>
</logger>
<root
level=
"INFO"
>
<root
level=
"INFO"
>
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/PortalApplication.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/PortalApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.framework.apollo.common.ApolloCommonConfig
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
import
org.springframework.boot.actuate.system.ApplicationPidFileWriter
;
...
@@ -12,8 +14,8 @@ import org.springframework.context.annotation.PropertySource;
...
@@ -12,8 +14,8 @@ import org.springframework.context.annotation.PropertySource;
@EnableAutoConfiguration
@EnableAutoConfiguration
@Configuration
@Configuration
@PropertySource
(
value
=
{
"classpath:portal.properties"
})
@PropertySource
(
value
=
{
"classpath:portal.properties"
})
@ComponentScan
(
basePackageClasses
=
{
com
.
ctrip
.
apollo
.
common
.
ApolloCommonConfig
.
class
,
@ComponentScan
(
basePackageClasses
=
{
ApolloCommonConfig
.
class
,
com
.
ctrip
.
apollo
.
portal
.
PortalApplication
.
class
})
PortalApplication
.
class
})
public
class
PortalApplication
{
public
class
PortalApplication
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/PortalSettings.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/PortalSettings.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -20,8 +20,8 @@ import org.springframework.boot.actuate.health.Health;
...
@@ -20,8 +20,8 @@ import org.springframework.boot.actuate.health.Health;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
@Component
@Component
public
class
PortalSettings
{
public
class
PortalSettings
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/api/API.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/api/API.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
api
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
com.ctrip.apollo.common.auth.RestTemplateFactory
;
import
com.ctrip.
framework.
apollo.common.auth.RestTemplateFactory
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.portal.service.ServiceLocator
;
import
com.ctrip.
framework.
apollo.portal.service.ServiceLocator
;
public
class
API
{
public
class
API
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/api/AdminServiceAPI.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/api/AdminServiceAPI.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
api
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
api
;
import
com.ctrip.apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
org.springframework.boot.actuate.health.Health
;
import
org.springframework.boot.actuate.health.Health
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
...
@@ -131,7 +131,7 @@ public class AdminServiceAPI {
...
@@ -131,7 +131,7 @@ public class AdminServiceAPI {
public
static
class
ReleaseAPI
extends
API
{
public
static
class
ReleaseAPI
extends
API
{
public
ReleaseDTO
loadLatestRelease
(
String
appId
,
Env
env
,
String
clusterName
,
public
ReleaseDTO
loadLatestRelease
(
String
appId
,
Env
env
,
String
clusterName
,
String
namespace
)
{
String
namespace
)
{
ReleaseDTO
releaseDTO
=
restTemplate
.
getForObject
(
ReleaseDTO
releaseDTO
=
restTemplate
.
getForObject
(
getAdminServiceHost
(
env
)
+
String
.
format
(
getAdminServiceHost
(
env
)
+
String
.
format
(
"apps/%s/clusters/%s/namespaces/%s/releases/latest"
,
appId
,
clusterName
,
namespace
),
"apps/%s/clusters/%s/namespaces/%s/releases/latest"
,
appId
,
clusterName
,
namespace
),
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/constants/PortalConstants.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/constants/PortalConstants.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
constants
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
constants
;
public
interface
PortalConstants
{
public
interface
PortalConstants
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/PortalAppController.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/controller/PortalAppController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -10,15 +10,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -10,15 +10,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.HttpClientErrorException
;
import
org.springframework.web.client.HttpClientErrorException
;
import
com.ctrip.apollo.common.http.MultiResponseEntity
;
import
com.ctrip.
framework.
apollo.common.http.MultiResponseEntity
;
import
com.ctrip.apollo.common.http.RichResponseEntity
;
import
com.ctrip.
framework.
apollo.common.http.RichResponseEntity
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.portal.PortalSettings
;
import
com.ctrip.
framework.
apollo.portal.PortalSettings
;
import
com.ctrip.apollo.portal.entity.EnvClusterInfo
;
import
com.ctrip.
framework.
apollo.portal.entity.EnvClusterInfo
;
import
com.ctrip.apollo.portal.service.PortalAppService
;
import
com.ctrip.
framework.
apollo.portal.service.PortalAppService
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/PortalConfigController.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/controller/PortalConfigController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.
framework.
apollo.portal.entity.ItemDiffs
;
import
com.ctrip.apollo.portal.entity.form.NamespaceSyncModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceSyncModel
;
import
com.ctrip.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.apollo.portal.entity.form.NamespaceReleaseModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceReleaseModel
;
import
com.ctrip.apollo.portal.service.PortalConfigService
;
import
com.ctrip.
framework.
apollo.portal.service.PortalConfigService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
...
@@ -54,8 +54,8 @@ public class PortalConfigController {
...
@@ -54,8 +54,8 @@ public class PortalConfigController {
@RequestMapping
(
value
=
"/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/release"
,
method
=
RequestMethod
.
POST
,
consumes
=
{
@RequestMapping
(
value
=
"/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/release"
,
method
=
RequestMethod
.
POST
,
consumes
=
{
"application/json"
})
"application/json"
})
public
ReleaseDTO
createRelease
(
@PathVariable
String
appId
,
public
ReleaseDTO
createRelease
(
@PathVariable
String
appId
,
@PathVariable
String
env
,
@PathVariable
String
clusterName
,
@PathVariable
String
env
,
@PathVariable
String
clusterName
,
@PathVariable
String
namespaceName
,
@RequestBody
NamespaceReleaseModel
model
)
{
@PathVariable
String
namespaceName
,
@RequestBody
NamespaceReleaseModel
model
)
{
if
(
model
==
null
)
{
if
(
model
==
null
)
{
throw
new
BadRequestException
(
"request payload shoud not be null"
);
throw
new
BadRequestException
(
"request payload shoud not be null"
);
}
}
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/PortalEnvController.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/controller/PortalEnvController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.portal.PortalSettings
;
import
com.ctrip.
framework.
apollo.portal.PortalSettings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/PortalNamespaceController.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/controller/PortalNamespaceController.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
controller
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
controller
;
import
com.ctrip.apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceVO
;
import
com.ctrip.apollo.portal.service.PortalNamespaceService
;
import
com.ctrip.
framework.
apollo.portal.service.PortalNamespaceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/EnvClusterInfo.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/EnvClusterInfo.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/ItemDiffs.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/ItemDiffs.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
public
class
ItemDiffs
{
public
class
ItemDiffs
{
private
NamespaceIdentifer
namespace
;
private
NamespaceIdentifer
namespace
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/NamespaceIdentifer.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/NamespaceIdentifer.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.portal.entity.form.Verifiable
;
import
com.ctrip.
framework.
apollo.portal.entity.form.Verifiable
;
public
class
NamespaceIdentifer
implements
Verifiable
{
public
class
NamespaceIdentifer
implements
Verifiable
{
private
String
appId
;
private
String
appId
;
private
String
env
;
private
String
env
;
private
String
clusterName
;
private
String
clusterName
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/NamespaceVO.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/NamespaceVO.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/NamespaceReleaseModel.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/form/NamespaceReleaseModel.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
.
form
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
.
form
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
public
class
NamespaceReleaseModel
implements
Verifiable
{
public
class
NamespaceReleaseModel
implements
Verifiable
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/NamespaceSyncModel.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/form/NamespaceSyncModel.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
.
form
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
.
form
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceIdentifer
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/NamespaceTextModel.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/form/NamespaceTextModel.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
.
form
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
.
form
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
public
class
NamespaceTextModel
implements
Verifiable
{
public
class
NamespaceTextModel
implements
Verifiable
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/entity/form/Verifiable.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/entity/form/Verifiable.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
entity
.
form
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
entity
.
form
;
public
interface
Verifiable
{
public
interface
Verifiable
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/PortalAppService.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/PortalAppService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -10,14 +10,14 @@ import org.springframework.stereotype.Service;
...
@@ -10,14 +10,14 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.client.HttpClientErrorException
;
import
org.springframework.web.client.HttpClientErrorException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
com.ctrip.apollo.common.utils.ExceptionUtils
;
import
com.ctrip.
framework.
apollo.common.utils.ExceptionUtils
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.portal.PortalSettings
;
import
com.ctrip.
framework.
apollo.portal.PortalSettings
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.entity.EnvClusterInfo
;
import
com.ctrip.
framework.
apollo.portal.entity.EnvClusterInfo
;
@Service
@Service
public
class
PortalAppService
{
public
class
PortalAppService
{
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/PortalClusterService.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/PortalClusterService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.dto.ClusterDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ClusterDTO
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/PortalConfigService.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/PortalConfigService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -8,21 +8,21 @@ import org.springframework.stereotype.Service;
...
@@ -8,21 +8,21 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.client.HttpClientErrorException
;
import
org.springframework.web.client.HttpClientErrorException
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.ctrip.
framework.
apollo.core.exception.NotFoundException
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.
framework.
apollo.portal.entity.ItemDiffs
;
import
com.ctrip.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.apollo.portal.entity.form.NamespaceReleaseModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceReleaseModel
;
import
com.ctrip.apollo.portal.service.txtresolver.ConfigTextResolver
;
import
com.ctrip.
framework.
apollo.portal.service.txtresolver.ConfigTextResolver
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/PortalNamespaceService.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/PortalNamespaceService.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.ctrip.apollo.common.utils.ExceptionUtils
;
import
com.ctrip.
framework.
apollo.common.utils.ExceptionUtils
;
import
com.ctrip.apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.AppNamespaceDTO
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.portal.PortalSettings
;
import
com.ctrip.
framework.
apollo.portal.PortalSettings
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceVO
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/ServiceLocator.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/ServiceLocator.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
;
import
java.net.URI
;
import
java.net.URI
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -18,10 +18,10 @@ import org.springframework.http.client.SimpleClientHttpRequestFactory;
...
@@ -18,10 +18,10 @@ import org.springframework.http.client.SimpleClientHttpRequestFactory;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
com.ctrip.apollo.core.MetaDomainConsts
;
import
com.ctrip.
framework.
apollo.core.MetaDomainConsts
;
import
com.ctrip.apollo.core.dto.ServiceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ServiceDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.
framework.
apollo.core.exception.ServiceException
;
/**
/**
* @author liuym
* @author liuym
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/txtresolver/ConfigTextResolver.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/txtresolver/ConfigTextResolver.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
java.util.List
;
import
java.util.List
;
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/service/txtresolver/PropertyResolver.java
→
apollo-portal/src/main/java/com/ctrip/
framework/
apollo/portal/service/txtresolver/PropertyResolver.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
.
service
.
txtresolver
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
service
.
txtresolver
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.utils.StringUtils
;
import
com.ctrip.
framework.
apollo.core.utils.StringUtils
;
import
com.ctrip.apollo.common.utils.BeanUtils
;
import
com.ctrip.
framework.
apollo.common.utils.BeanUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/LocalPortalApplication.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/LocalPortalApplication.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
;
package
com
.
ctrip
.
framework
.
apollo
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/AbstractPortalTest.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/AbstractPortalTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.apollo.portal.PortalApplication
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/AllTests.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/AllTests.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/ConfigServiceTest.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/ConfigServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.apollo.core.ConfigConsts
;
import
com.ctrip.
framework.
apollo.core.ConfigConsts
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.entity.ItemDiffs
;
import
com.ctrip.
framework.
apollo.portal.entity.ItemDiffs
;
import
com.ctrip.apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceIdentifer
;
import
com.ctrip.apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.
framework.
apollo.portal.entity.form.NamespaceTextModel
;
import
com.ctrip.apollo.portal.service.PortalConfigService
;
import
com.ctrip.
framework.
apollo.portal.service.PortalConfigService
;
import
com.ctrip.apollo.portal.service.txtresolver.PropertyResolver
;
import
com.ctrip.
framework.
apollo.portal.service.txtresolver.PropertyResolver
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Before
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/NamespaceServiceTest.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/NamespaceServiceTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.dto.NamespaceDTO
;
import
com.ctrip.
framework.
apollo.core.dto.NamespaceDTO
;
import
com.ctrip.apollo.core.dto.ReleaseDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ReleaseDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.
framework.
apollo.core.enums.Env
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.
framework.
apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.entity.NamespaceVO
;
import
com.ctrip.
framework.
apollo.portal.entity.NamespaceVO
;
import
com.ctrip.apollo.portal.service.PortalNamespaceService
;
import
com.ctrip.
framework.
apollo.portal.service.PortalNamespaceService
;
import
com.ctrip.apollo.portal.service.txtresolver.PropertyResolver
;
import
com.ctrip.
framework.
apollo.portal.service.txtresolver.PropertyResolver
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/PropertyResolverTest.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/PropertyResolverTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
com.ctrip.apollo.core.dto.ItemChangeSets
;
import
com.ctrip.
framework.
apollo.core.dto.ItemChangeSets
;
import
com.ctrip.apollo.core.dto.ItemDTO
;
import
com.ctrip.
framework.
apollo.core.dto.ItemDTO
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.
framework.
apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.portal.service.txtresolver.ConfigTextResolver
;
import
com.ctrip.
framework.
apollo.portal.service.txtresolver.ConfigTextResolver
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
...
...
apollo-portal/src/test/java/com/ctrip/apollo/portal/ServiceExceptionTest.java
→
apollo-portal/src/test/java/com/ctrip/
framework/
apollo/portal/ServiceExceptionTest.java
View file @
007a3ed7
package
com
.
ctrip
.
apollo
.
portal
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
;
import
static
org
.
mockito
.
Matchers
.
any
;
import
static
org
.
mockito
.
Matchers
.
any
;
...
@@ -21,12 +21,13 @@ import org.springframework.test.util.ReflectionTestUtils;
...
@@ -21,12 +21,13 @@ import org.springframework.test.util.ReflectionTestUtils;
import
org.springframework.web.client.HttpServerErrorException
;
import
org.springframework.web.client.HttpServerErrorException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
org.springframework.web.client.HttpStatusCodeException
;
import
com.ctrip.apollo.common.utils.ExceptionUtils
;
import
com.ctrip.framework.apollo.common.utils.ExceptionUtils
;
import
com.ctrip.apollo.core.dto.AppDTO
;
import
com.ctrip.framework.apollo.core.dto.AppDTO
;
import
com.ctrip.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.apollo.core.exception.ServiceException
;
import
com.ctrip.framework.apollo.core.exception.ServiceException
;
import
com.ctrip.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.apollo.portal.service.PortalAppService
;
import
com.ctrip.framework.apollo.portal.service.PortalAppService
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
public
class
ServiceExceptionTest
extends
AbstractPortalTest
{
public
class
ServiceExceptionTest
extends
AbstractPortalTest
{
...
...
apollo-portal/src/test/resources/META-INF/plexus/plexus.xml
View file @
007a3ed7
...
@@ -2,17 +2,17 @@
...
@@ -2,17 +2,17 @@
<components>
<components>
<component>
<component>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<role>
com.dianping.cat.configuration.ClientConfigManager
</role>
<implementation>
com.ctrip.apollo.cat.NullClientConfigManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullClientConfigManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<role>
com.dianping.cat.message.io.TransportManager
</role>
<implementation>
com.ctrip.apollo.cat.NullTransportManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullTransportManager
</implementation>
</implementation>
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<role>
com.dianping.cat.message.spi.MessageManager
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageManager
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</component>
</component>
<component>
<component>
<role>
com.dianping.cat.message.MessageProducer
</role>
<role>
com.dianping.cat.message.MessageProducer
</role>
<implementation>
com.ctrip.apollo.cat.NullMessageProducer
<implementation>
com.ctrip.
framework.
apollo.cat.NullMessageProducer
</implementation>
</implementation>
<requirements>
<requirements>
<requirement>
<requirement>
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
</component>
</component>
<component>
<component>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<role>
org.codehaus.plexus.logging.LoggerManager
</role>
<implementation>
com.ctrip.apollo.cat.NullLoggerManager
<implementation>
com.ctrip.
framework.
apollo.cat.NullLoggerManager
</implementation>
</implementation>
</component>
</component>
</components>
</components>
</plexus>
</plexus>
\ No newline at end of file
application.pid
deleted
100644 → 0
View file @
58d59c1f
13303
\ No newline at end of file
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