Commit dd3d6343 authored by xiaoguang.xu's avatar xiaoguang.xu

refactor: remove motan dependency

parent 8cb02918
...@@ -250,100 +250,47 @@ ...@@ -250,100 +250,47 @@
<artifactId>apollo-client</artifactId> <artifactId>apollo-client</artifactId>
<version>0.10.2</version> <version>0.10.2</version>
<scope>compile</scope> <scope>compile</scope>
</dependency><dependency> </dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>commons-spring</artifactId>
</dependency>
<dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>commons-core</artifactId>
</dependency>
<dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>shutdown-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>brave-spring-boot-starter</artifactId>
</dependency>
<!--logback使用1.1.4版本-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.4</version>
</dependency>
<!-- motan -->
<dependency> <dependency>
<groupId>com.weibo</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>motan-core</artifactId> <artifactId>commons-spring</artifactId>
<version>0.2.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>hession-bugfix</artifactId> <artifactId>commons-core</artifactId>
<version>4.0.38</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.weibo</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>motan-transport-netty</artifactId> <artifactId>shutdown-spring-boot-starter</artifactId>
<version>0.2.2</version>
</dependency> </dependency>
<!-- only needed for spring-based features -->
<dependency> <dependency>
<groupId>com.weibo</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>motan-springsupport</artifactId> <artifactId>brave-spring-boot-starter</artifactId>
<version>0.2.2</version> </dependency>
<exclusions> <!--logback使用1.1.4版本-->
<exclusion> <dependency>
<groupId>org.slf4j</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>slf4j-log4j12</artifactId> <artifactId>logback-classic</artifactId>
</exclusion> <version>1.1.4</version>
</exclusions> </dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.quantgroup</groupId> <groupId>cn.quantgroup</groupId>
<artifactId>xyqb-user-rpc-commons</artifactId> <artifactId>xyqb-user-rpc-commons</artifactId>
<version>1.1.6-SNAPSHOT</version> <version>1.1.6-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.weibo</groupId>
<artifactId>motan-registry-zookeeper</artifactId>
<version>0.2.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- spring security -->
<!-- 兼容旧 Spring Session 配置--> <!-- 兼容旧 Spring Session 配置-->
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId> <artifactId>spring-security-core</artifactId>
<version>${org.springframework.security.version}</version> <version>${org.springframework.security.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.security</groupId> <groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId> <artifactId>spring-security-web</artifactId>
...@@ -383,59 +330,5 @@ ...@@ -383,59 +330,5 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<id>product</id>
<properties>
<profiles.activation>product</profiles.activation>
</properties>
<build>
<resources>
<resource>
<directory>
${project.basedir}/src/main/resources/config/release01
</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>dev</id>
<properties>
<profiles.activation>dev</profiles.activation>
</properties>
<build>
<resources>
<resource>
<directory>
${project.basedir}/src/main/resources/config/dev
</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>test</id>
<properties>
<profiles.activation>test</profiles.activation>
</properties>
<dependencies>
<dependency>
<groupId>cn.quantgroup</groupId>
<artifactId>quantgroup-sms-sdk</artifactId>
<version>2.0.0.3-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>
${project.basedir}/src/main/resources/config/test
</directory>
</resource>
</resources>
</build>
</profile>
</profiles>
</project> </project>
package cn.quantgroup.xyqb; package cn.quantgroup.xyqb;
import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
/** /**
......
package cn.quantgroup.xyqb.controller.external.motan;
import cn.quantgroup.xyqb.model.JsonResult;
import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/motan")
public class MotanController {
@RequestMapping("/enable/{key}")
public JsonResult reload(@PathVariable String key) {
if (StringUtils.equals(key, "b5140fb2-2c85-4b5a-abcf-3e97528014db")) {
MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
return JsonResult.buildSuccessResult("加载成功", null);
}
return JsonResult.buildErrorStateResult("无效", null);
}
@RequestMapping("/disable/{key}")
public JsonResult disable(@PathVariable String key) {
if (StringUtils.equals(key, "b5140fb2-2c85-4b5a-abcf-3e97528014db")) {
MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, false);
return JsonResult.buildSuccessResult("加载成功", null);
}
return JsonResult.buildErrorStateResult("无效", null);
}
}
...@@ -28,7 +28,6 @@ import com.alibaba.fastjson.JSON; ...@@ -28,7 +28,6 @@ import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.weibo.api.motan.config.springsupport.annotation.MotanService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
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