Commit 007a3ed7 authored by lepdou's avatar lepdou

rename base package name 2 com.ctrip.framework.apollo

parent 58d59c1f
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 =
......
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 {
......
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 {
......
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;
......
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 {
......
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;
......
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 {
......
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 {
......
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) {
......
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;
......
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;
......
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 = {
......
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;
......
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 {
} }
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)
......
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 {
......
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;
......
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 {
......
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 {
......
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 {
......
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;
......
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;
......
...@@ -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
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})
......
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})
......
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 {
} }
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;
......
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;
......
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;
......
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 {
......
package com.ctrip.apollo.biz.datasource; package com.ctrip.framework.apollo.biz.datasource;
import java.lang.reflect.Method; import java.lang.reflect.Method;
......
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
......
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;
......
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;
......
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;
......
package com.ctrip.apollo.biz.entity; package com.ctrip.framework.apollo.biz.entity;
import java.util.Date; import java.util.Date;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
package com.ctrip.apollo.biz.entity; package com.ctrip.framework.apollo.biz.entity;
import java.util.Date; import java.util.Date;
......
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;
......
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;
......
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;
......
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)
......
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)
......
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;
......
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)
......
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;
......
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> {
......
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> {
......
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;
......
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;
......
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> {
......
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> {
......
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;
......
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;
......
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)
......
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;
......
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 {
......
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 {
......
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 {
......
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 {
......
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;
} }
......
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;
......
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;
......
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 {
......
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 {
......
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 {
......
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;
......
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;
......
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;
......
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);
} }
......
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;
......
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 {
} }
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;
......
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;
......
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;
......
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;
......
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)
......
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)
......
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)
......
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)
......
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;
......
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)
......
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;
......
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
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;
......
package com.ctrip.apollo.cat; package com.ctrip.framework.apollo.cat;
import java.io.IOException; import java.io.IOException;
......
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;
......
package com.ctrip.apollo; package com.ctrip.framework.apollo;
/** /**
* @author Jason Song(song_s@ctrip.com) * @author Jason Song(song_s@ctrip.com)
......
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)
......
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;
......
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;
......
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) {
......
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;
......
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)
......
package com.ctrip.apollo.internals; package com.ctrip.framework.apollo.internals;
import java.util.Properties; import java.util.Properties;
......
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;
......
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)
*/ */
......
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;
......
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;
......
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;
......
package com.ctrip.apollo.internals; package com.ctrip.framework.apollo.internals;
import java.util.Properties; import java.util.Properties;
......
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;
......
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.
......
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;
......
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)
......
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)
......
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!
......
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;
......
package com.ctrip.apollo.spi; package com.ctrip.framework.apollo.spi;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
......
package com.ctrip.apollo.spi; package com.ctrip.framework.apollo.spi;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
......
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;
......
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;
......
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)
......
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)
......
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;
......
<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>
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
package com.ctrip.apollo.util; package com.ctrip.framework.apollo.util;
import org.junit.Test; import org.junit.Test;
......
...@@ -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
...@@ -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">
......
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 {
} }
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;
......
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;
......
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
......
package com.ctrip.apollo.common.controller; package com.ctrip.framework.apollo.common.controller;
import javax.servlet.DispatcherType; import javax.servlet.DispatcherType;
......
package com.ctrip.apollo.common.controller; package com.ctrip.framework.apollo.common.controller;
import javax.servlet.DispatcherType; import javax.servlet.DispatcherType;
......
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;
......
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;
......
package com.ctrip.apollo.common.controller; package com.ctrip.framework.apollo.common.controller;
import java.util.List; import java.util.List;
......
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;
......
package com.ctrip.apollo.common.http; package com.ctrip.framework.apollo.common.http;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
package com.ctrip.apollo.common.http; package com.ctrip.framework.apollo.common.http;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
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;
......
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;
......
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 {
......
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;
......
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;
......
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;
......
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;
......
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;
......
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 {
} }
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;
......
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;
......
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;
......
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;
......
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;
......
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());
......
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;
......
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;
......
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;
......
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;
......
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;
......
...@@ -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
package com.ctrip.apollo; package com.ctrip.framework.apollo;
/** /**
* @author Jason Song(song_s@ctrip.com) * @author Jason Song(song_s@ctrip.com)
......
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";
......
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
......
package com.ctrip.apollo.core; package com.ctrip.framework.apollo.core;
public interface ServiceNameConsts { public interface ServiceNameConsts {
......
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;
......
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)
......
package com.ctrip.apollo.core.dto; package com.ctrip.framework.apollo.core.dto;
public class AppDTO { public class AppDTO {
......
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;
......
package com.ctrip.apollo.core.dto; package com.ctrip.framework.apollo.core.dto;
public class ClusterDTO { public class ClusterDTO {
......
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;
......
package com.ctrip.apollo.core.dto; package com.ctrip.framework.apollo.core.dto;
import java.util.Date; import java.util.Date;
......
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;
......
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;
......
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;
......
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)
......
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 {
......
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{
......
package com.ctrip.apollo.core.exception; package com.ctrip.framework.apollo.core.exception;
public class BadRequestException extends AbstractBaseException { public class BadRequestException extends AbstractBaseException {
......
package com.ctrip.apollo.core.exception; package com.ctrip.framework.apollo.core.exception;
public class NotFoundException extends AbstractBaseException { public class NotFoundException extends AbstractBaseException {
/** /**
......
package com.ctrip.apollo.core.exception; package com.ctrip.framework.apollo.core.exception;
public class ServiceException extends AbstractBaseException { public class ServiceException extends AbstractBaseException {
......
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)
......
package com.ctrip.apollo.core.schedule; package com.ctrip.framework.apollo.core.schedule;
/** /**
* Schedule policy * Schedule policy
......
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;
......
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)
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
...@@ -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">
......
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 {
......
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 {
......
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 {
......
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),
......
package com.ctrip.apollo.portal.constants; package com.ctrip.framework.apollo.portal.constants;
public interface PortalConstants { public interface PortalConstants {
......
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;
......
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");
} }
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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 {
......
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;
......
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 {
......
package com.ctrip.apollo.portal.entity.form; package com.ctrip.framework.apollo.portal.entity.form;
public interface Verifiable { public interface Verifiable {
......
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 {
......
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;
......
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;
......
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;
......
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
......
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;
......
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;
......
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;
......
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;
......
package com.ctrip.apollo.portal; package com.ctrip.framework.apollo.portal;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
......
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;
......
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;
......
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;
......
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 {
......
...@@ -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
13303
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment