mirror of https://github.com/jeecgboot/jeecg-boot
代码格式和文字简单调整
parent
0079050109
commit
f6fc896982
|
@ -45,6 +45,12 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- sentinel集成nacos作为数据源 -->
|
<!-- sentinel集成nacos作为数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -23,16 +23,11 @@ public class GatewayRoutersConfig {
|
||||||
public String username;
|
public String username;
|
||||||
public String password;
|
public String password;
|
||||||
|
|
||||||
@Value("${spring.cloud.nacos.discovery.server-addr}")
|
@Value("${jeecg.route.config.data-type:#{null}}")
|
||||||
public void setServerAddr(String serverAddr) {
|
public void setDataType(String dataType) {
|
||||||
this.serverAddr = serverAddr;
|
this.dataType = dataType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("${spring.cloud.nacos.discovery.namespace:#{null}}")
|
|
||||||
public void setNamespace(String namespace) {
|
|
||||||
this.namespace = namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Value("${jeecg.route.config.data-id:#{null}}")
|
@Value("${jeecg.route.config.data-id:#{null}}")
|
||||||
public void setRouteDataId(String dataId) {
|
public void setRouteDataId(String dataId) {
|
||||||
this.dataId = dataId + ".json";
|
this.dataId = dataId + ".json";
|
||||||
|
@ -43,9 +38,14 @@ public class GatewayRoutersConfig {
|
||||||
this.routeGroup = routeGroup;
|
this.routeGroup = routeGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("${jeecg.route.config.data-type:#{null}}")
|
@Value("${spring.cloud.nacos.discovery.server-addr}")
|
||||||
public void setDataType(String dataType) {
|
public void setServerAddr(String serverAddr) {
|
||||||
this.dataType = dataType;
|
this.serverAddr = serverAddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Value("${spring.cloud.nacos.discovery.namespace:#{null}}")
|
||||||
|
public void setNamespace(String namespace) {
|
||||||
|
this.namespace = namespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Value("${spring.cloud.nacos.config.username:#{null}}")
|
@Value("${spring.cloud.nacos.config.username:#{null}}")
|
||||||
|
|
|
@ -9,3 +9,8 @@
|
||||||
- 3、如何不用此模块,使用自己的naocs,请创建下面目录中的配置文件
|
- 3、如何不用此模块,使用自己的naocs,请创建下面目录中的配置文件
|
||||||
目录:jeecg-cloud-nacos/docs/config
|
目录:jeecg-cloud-nacos/docs/config
|
||||||
配置文件: YAML
|
配置文件: YAML
|
||||||
|
|
||||||
|
|
||||||
|
# 常见问题
|
||||||
|
- UnsupportedOperationException: Cannot determine JNI library name for ARCH='x86' OS='windows 10'
|
||||||
|
解决方案:http://t.zoukankan.com/mindzone-p-15808190.html
|
|
@ -51,4 +51,4 @@ nacos:
|
||||||
security:
|
security:
|
||||||
ignore:
|
ignore:
|
||||||
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
urls: /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
standalone: true
|
standalone: true
|
|
@ -29,6 +29,7 @@
|
||||||
<artifactId>jeecg-boot-starter-job</artifactId>
|
<artifactId>jeecg-boot-starter-job</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 引入demo模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-module-demo</artifactId>
|
<artifactId>jeecg-module-demo</artifactId>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>jeecg-system-cloud-start</artifactId>
|
<artifactId>jeecg-system-cloud-start</artifactId>
|
||||||
<description>System微服务启动</description>
|
<description>System项目微服务启动</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 引入jeecg-boot-starter-cloud依赖 -->
|
<!-- 引入jeecg-boot-starter-cloud依赖 -->
|
||||||
|
|
|
@ -4,7 +4,7 @@ package org.jeecg.modules.test.feign.controller;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.test.feign.client.*;
|
import org.jeecg.modules.test.feign.client.JeecgTestClient;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.alibaba.csp.sentinel.annotation.SentinelResource;
|
import com.alibaba.csp.sentinel.annotation.SentinelResource;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package org.jeecg.modules.test.lock;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.boot.starter.lock.annotation.JLock;
|
import org.jeecg.boot.starter.lock.annotation.JLock;
|
||||||
import org.jeecg.boot.starter.lock.client.RedissonLockClient;
|
import org.jeecg.boot.starter.lock.client.RedissonLockClient;
|
||||||
import org.jeecg.boot.starter.rabbitmq.client.RabbitMqClient;
|
|
||||||
import org.jeecg.common.base.BaseMap;
|
|
||||||
import org.jeecg.modules.test.constant.CloudConstant;
|
import org.jeecg.modules.test.constant.CloudConstant;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
<version>${jeecgboot.version}</version>
|
<version>${jeecgboot.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class JeecgShardingDemoController extends JeecgController<ShardingSysLog,
|
||||||
@ApiOperation(value = "分库分表插入", notes = "分库分表")
|
@ApiOperation(value = "分库分表插入", notes = "分库分表")
|
||||||
public Result<?> test2() {
|
public Result<?> test2() {
|
||||||
int start=20;
|
int start=20;
|
||||||
int size=50;
|
int size=30;
|
||||||
for (int i = start; i <= size; i++) {
|
for (int i = start; i <= size; i++) {
|
||||||
ShardingSysLog shardingSysLog = new ShardingSysLog();
|
ShardingSysLog shardingSysLog = new ShardingSysLog();
|
||||||
shardingSysLog.setLogContent("分库分表测试");
|
shardingSysLog.setLogContent("分库分表测试");
|
||||||
|
|
Loading…
Reference in New Issue