Commit a9644e5d authored by 曹志's avatar 曹志

依赖问题修复

parent f41f41db
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -174,6 +174,7 @@ ...@@ -174,6 +174,7 @@
<groupId>ground</groupId> <groupId>ground</groupId>
<artifactId>sdk_release_gs1</artifactId> <artifactId>sdk_release_gs1</artifactId>
<version>1.51.61</version> <version>1.51.61</version>
<optional>true</optional>
</dependency> </dependency>
<!-- nacos-client --> <!-- nacos-client -->
......
...@@ -61,6 +61,11 @@ ...@@ -61,6 +61,11 @@
<artifactId>resteasy-jaxrs</artifactId> <artifactId>resteasy-jaxrs</artifactId>
<version>3.13.0.Final</version> <version>3.13.0.Final</version>
</dependency> </dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.13.0.Final</version>
</dependency>
<!-- tomcat-embed-core --> <!-- tomcat-embed-core -->
<dependency> <dependency>
<groupId>org.apache.tomcat.embed</groupId> <groupId>org.apache.tomcat.embed</groupId>
...@@ -74,5 +79,12 @@ ...@@ -74,5 +79,12 @@
<artifactId>fastjson-jaxrs-json-provider</artifactId> <artifactId>fastjson-jaxrs-json-provider</artifactId>
<version>0.3.2</version> <version>0.3.2</version>
</dependency> </dependency>
<!-- SpringBoot配置处理器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
package com.spacetech.config; package com.spacetech.config;
import com.spacetech.config.property.MemcacheProperties;
import com.spacetech.framework.SystemContext; import com.spacetech.framework.SystemContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -9,14 +12,25 @@ import org.springframework.context.annotation.Configuration; ...@@ -9,14 +12,25 @@ import org.springframework.context.annotation.Configuration;
* 配置Memcache * 配置Memcache
*/ */
@Configuration @Configuration
@EnableConfigurationProperties(MemcacheProperties.class)
public class MemcacheConfig { public class MemcacheConfig {
@Autowired
private MemcacheProperties properties;
@Bean(initMethod = "init") @Bean(initMethod = "init")
public SystemContext systemContext(){ public SystemContext systemContext(){
return new SystemContext(); SystemContext systemContext = new SystemContext();
systemContext.setMemcacheutilIpPort(properties.getServerAddr());
systemContext.setMemcacheutilUsername(properties.getUsername());
systemContext.setMemcacheutilPassword(properties.getPassword());
systemContext.setMemcacheforonecardutilIpPort(properties.getOneCard().getServerAddr());
systemContext.setMemcacheforonecardutilUsername(properties.getOneCard().getUsername());
systemContext.setMemcacheforonecardutilPassword(properties.getOneCard().getPassword());
systemContext.setLocalfileDic(properties.getLocalfileDic());
systemContext.setLocalfileInternet(properties.getLocalfileInternet());
return systemContext;
} }
} }
package com.spacetech.config.property;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "memcache")
public class MemcacheProperties {
private String serverAddr;
private String username;
private String password;
private Boolean internalOss = false;
private Boolean saveLocalfile = false;
private String localfileDic = "";
private String localfileInternet;
private OnecardProperties oneCard = new OnecardProperties();
public String getServerAddr() {
return serverAddr;
}
public void setServerAddr(String serverAddr) {
this.serverAddr = serverAddr;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Boolean getInternalOss() {
return internalOss;
}
public void setInternalOss(Boolean internalOss) {
this.internalOss = internalOss;
}
public OnecardProperties getOneCard() {
return oneCard;
}
public void setOneCard(OnecardProperties oneCard) {
this.oneCard = oneCard;
}
public Boolean getSaveLocalfile() {
return saveLocalfile;
}
public void setSaveLocalfile(Boolean saveLocalfile) {
this.saveLocalfile = saveLocalfile;
}
public String getLocalfileDic() {
return localfileDic;
}
public void setLocalfileDic(String localfileDic) {
this.localfileDic = localfileDic;
}
public String getLocalfileInternet() {
return localfileInternet;
}
public void setLocalfileInternet(String localfileInternet) {
this.localfileInternet = localfileInternet;
}
public static class OnecardProperties{
private String serverAddr;
private String username;
private String password;
public String getServerAddr() {
return serverAddr;
}
public void setServerAddr(String serverAddr) {
this.serverAddr = serverAddr;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
}
package com.spacetech.framework; package com.spacetech.framework;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.spacetech.common.ConstantVar; import com.spacetech.common.ConstantVar;
import com.spacetech.common.utils.FileUtil; import com.spacetech.common.utils.FileUtil;
...@@ -14,6 +8,13 @@ import com.spacetech.provider.ApiProvider; ...@@ -14,6 +8,13 @@ import com.spacetech.provider.ApiProvider;
import com.spacetech.util.MemCacheForOnecardUtil; import com.spacetech.util.MemCacheForOnecardUtil;
import com.spacetech.util.MemCacheUtil; import com.spacetech.util.MemCacheUtil;
import javax.annotation.PostConstruct;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
/** /**
* *
* @author wm web工程上下文 * @author wm web工程上下文
...@@ -37,6 +38,7 @@ public final class SystemContext { ...@@ -37,6 +38,7 @@ public final class SystemContext {
public static String SERVER_IP_ADDRESS = ""; public static String SERVER_IP_ADDRESS = "";
public void init() { public void init() {
// 初始化参数配置 // 初始化参数配置
...@@ -48,9 +50,7 @@ public final class SystemContext { ...@@ -48,9 +50,7 @@ public final class SystemContext {
throw new RuntimeException("Zookeeper未配置本地存储目录路径"); throw new RuntimeException("Zookeeper未配置本地存储目录路径");
} }
FileUtil.makeDir(localfileDic); FileUtil.makeDir(localfileDic);
if (saveLocalfile && StringUtil.isNullOrEmpty(localfileInternet)) {
throw new RuntimeException("Zookeeper未配置本地访问路径");
}
baseParams.put("saveLocalfile", saveLocalfile); baseParams.put("saveLocalfile", saveLocalfile);
baseParams.put("localfileDic", localfileDic); baseParams.put("localfileDic", localfileDic);
baseParams.put("localfileInternet", localfileInternet); baseParams.put("localfileInternet", localfileInternet);
......
...@@ -8,7 +8,7 @@ import java.util.Arrays; ...@@ -8,7 +8,7 @@ import java.util.Arrays;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import jdk.nashorn.internal.ir.annotations.Reference; import org.apache.dubbo.config.annotation.Reference;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -112,7 +112,7 @@ public class ApiHub { ...@@ -112,7 +112,7 @@ public class ApiHub {
@Reference @Reference
private TokenApiHub tokenApiHub; private TokenApiHub tokenApiHub;
@Reference @Autowired
private ProviderService providerService; private ProviderService providerService;
@Reference @Reference
......
...@@ -67,6 +67,17 @@ dubbo: ...@@ -67,6 +67,17 @@ dubbo:
scan: scan:
base-packages: com.spacetech.service base-packages: com.spacetech.service
cloud: cloud:
subscribed-services: service-growth,service-basedata subscribed-services: '*'
consumer: consumer:
check: false check: false
memcache:
server-addr: 10.10.10.190:33332
username: spaceplaceholder
password: spaceplaceholder
one-card:
server-addr: 10.10.10.190:33333
username: spaceplaceholder
password: spaceplaceholder
internal-oss: false
localfile-dic: /mnt/work/weixtshare/
localfile-internet: http://weixt.spacetech.com.cn:8090/weixtshare/
\ No newline at end of file
...@@ -52,11 +52,15 @@ ...@@ -52,11 +52,15 @@
</exclusions> </exclusions>
</dependency> </dependency>
--> -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.13.0.Final</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -76,7 +76,7 @@ public class MemCacheForOnecardUtil { ...@@ -76,7 +76,7 @@ public class MemCacheForOnecardUtil {
/** /**
* 设置aeskey * 设置aeskey
* *
* @param aesKey * @param
*/ */
public static String getAesKeyDataSafe() { public static String getAesKeyDataSafe() {
String result = ""; String result = "";
......
spring: spring:
application: application:
name: service-growth name: growth
cloud: cloud:
nacos: nacos:
# nacos 服务发现 # nacos 服务发现
......
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!--sentinel 流控--> <!--sentinel 流控-->
......
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