更新acs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.acs.agv.server;
|
||||
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.acs.agv.server.dto.AgvDto;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
@@ -45,7 +46,7 @@ public interface XianGongAgvService {
|
||||
*/
|
||||
public HttpResponse queryXZAgvDeviceStatus();
|
||||
|
||||
public HttpResponse queryXZAgvInstStatus(String instCode);
|
||||
public HttpResponse queryXZAgvInstStatus();
|
||||
|
||||
/**
|
||||
* 删除先知任务
|
||||
@@ -67,6 +68,7 @@ public interface XianGongAgvService {
|
||||
|
||||
public HttpResponse addOrderSequences(Instruction inst) throws Exception;
|
||||
|
||||
public JSONArray createBlocksData(Instruction inst);
|
||||
/**
|
||||
* 组织json数据
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.agv.server.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
@@ -168,19 +169,17 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
@Override
|
||||
public HttpResponse queryXZAgvInstStatus(String instCode) {
|
||||
|
||||
public HttpResponse queryXZAgvInstStatus() {
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
|
||||
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue();
|
||||
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue();
|
||||
|
||||
agvurl = agvurl + ":" + agvport + "/api/route/transportOrders/" + instCode;
|
||||
agvurl = agvurl + ":" + agvport + "/orders?page=1&size=9999";
|
||||
|
||||
HttpResponse result = HttpRequest.get(agvurl)
|
||||
.timeout(20000)//超时,毫秒
|
||||
.execute();
|
||||
System.out.println("查询agv指令数据:" + result.body());
|
||||
|
||||
log.info("queryXZAgvInstStatus----查询agv指令数据:{}" + result.body());
|
||||
return result;
|
||||
} else {
|
||||
|
||||
@@ -211,31 +210,16 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
@Override
|
||||
public HttpResponse sendOrderSequencesToXZ(Instruction inst) throws Exception {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("intendedVehicle", "");
|
||||
jo.put("category", "");
|
||||
jo.put("failureFatal", false);
|
||||
jo.put("complete", false);
|
||||
JSONArray transports = new JSONArray();
|
||||
JSONObject orderjo = new JSONObject();
|
||||
orderjo.put("name", inst.getInstruction_code());
|
||||
orderjo.put("order", createOrederData(inst, "1"));
|
||||
transports.add(orderjo);
|
||||
jo.put("transports", transports);
|
||||
|
||||
JSONArray ja1 = new JSONArray();
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("key", "");
|
||||
jo1.put("value", "");
|
||||
ja1.add(jo1);
|
||||
jo.put("properties", ja1);
|
||||
|
||||
jo.put("id", inst.getInstruction_code());
|
||||
jo.put("complete", true);
|
||||
jo.put("blocks", createBlocksData(inst));
|
||||
jo.put("priority", inst.getPriority());
|
||||
log.info("任务号:{},指令号{},下发agv订单序列参数:{}", inst.getTask_code(), inst.getInstruction_code(), jo.toString());
|
||||
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
|
||||
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue();
|
||||
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue();
|
||||
|
||||
agvurl = agvurl + ":" + agvport + "/api/route/orderSequences/" + inst.getTask_code();
|
||||
agvurl = agvurl + ":" + agvport + "/setOrder";
|
||||
|
||||
HttpResponse result = HttpRequest.post(agvurl)
|
||||
.body(String.valueOf(jo))//表单内容
|
||||
@@ -243,13 +227,28 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
.execute();
|
||||
log.info(agvurl);
|
||||
log.info("任务号:{},指令号{},状态{},下发agv订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body());
|
||||
|
||||
return result;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray createBlocksData(Instruction inst) {
|
||||
JSONArray ja = new JSONArray();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("blockId", IdUtil.simpleUUID());
|
||||
jo.put("location",inst.getStart_point_code());
|
||||
jo.put("operation","JackLoad");
|
||||
ja.add(jo);
|
||||
JSONObject jo1 = new JSONObject();
|
||||
jo1.put("blockId",IdUtil.simpleUUID());
|
||||
jo1.put("location",inst.getNext_point_code());
|
||||
jo1.put("operation","JackUnload");
|
||||
ja.add(jo1);
|
||||
return ja;
|
||||
}
|
||||
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
@Override
|
||||
public HttpResponse addOrderSequences(Instruction inst) throws Exception {
|
||||
|
||||
@@ -266,4 +266,13 @@ public interface InstructionService {
|
||||
|
||||
boolean removeByCodeFromCache(String code);
|
||||
|
||||
|
||||
/**
|
||||
* 根据指令号缓存查询
|
||||
*
|
||||
* @param inst_code inst_code
|
||||
* @return Instruction
|
||||
*/
|
||||
Instruction findByInstCodeFromCache(String inst_code);
|
||||
|
||||
}
|
||||
|
||||
@@ -301,59 +301,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
CargoLiftConveyorDeviceDriver cargoLiftConveyorDeviceDriver;
|
||||
HaoKaiAutoConveyorDeviceDriver haoKaiAutoConveyorDeviceDriver;
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
||||
//输送线相关需要给任务字段进行赋值,通过任务来判断输送线当前执行到哪一步
|
||||
if (startdevice.getDeviceDriver() instanceof CargoLiftConveyorDeviceDriver) {
|
||||
cargoLiftConveyorDeviceDriver = (CargoLiftConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||
cargoLiftConveyorDeviceDriver.writing(3, Integer.valueOf(dto.getInstruction_code()));
|
||||
if (nextdevice.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver){
|
||||
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) nextdevice.getDeviceDriver();
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(1,1);
|
||||
String address = standardCoveyorControlWithScannerDeviceDriver.getExtraValue().get("address").toString();
|
||||
if (StrUtil.isEmpty(address)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置电气调度号!");
|
||||
}
|
||||
String door = standardCoveyorControlWithScannerDeviceDriver.getExtraValue().get("door").toString();
|
||||
if (StrUtil.isEmpty(door)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置门!");
|
||||
}
|
||||
String floor = standardCoveyorControlWithScannerDeviceDriver.getExtraValue().get("floor").toString();
|
||||
if (StrUtil.isEmpty(floor)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置楼层!");
|
||||
}
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(2, Integer.parseInt(address));
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(3, Integer.parseInt(task_code));
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(4, Integer.parseInt(door));
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(5, Integer.parseInt(floor));
|
||||
}
|
||||
}
|
||||
if (startdevice.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
||||
standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) startdevice.getDeviceDriver();
|
||||
standardCoveyorControlWithScannerDeviceDriver.writing(3, Integer.valueOf(dto.getInstruction_code()));
|
||||
if (nextdevice.getDeviceDriver() instanceof CargoLiftConveyorDeviceDriver){
|
||||
cargoLiftConveyorDeviceDriver = (CargoLiftConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||
cargoLiftConveyorDeviceDriver.writing(1,1);
|
||||
String address = cargoLiftConveyorDeviceDriver.getExtraValue().get("address").toString();
|
||||
if (StrUtil.isEmpty(address)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置电气调度号!");
|
||||
}
|
||||
String door = cargoLiftConveyorDeviceDriver.getExtraValue().get("door").toString();
|
||||
if (StrUtil.isEmpty(door)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置门!");
|
||||
}
|
||||
String floor = cargoLiftConveyorDeviceDriver.getExtraValue().get("floor").toString();
|
||||
if (StrUtil.isEmpty(floor)){
|
||||
throw new BadRequestException("设备:"+nextdevice.getDevice_code()+"未设置楼层!");
|
||||
}
|
||||
cargoLiftConveyorDeviceDriver.writing(2, Integer.parseInt(address));
|
||||
cargoLiftConveyorDeviceDriver.writing(3, Integer.parseInt(task_code));
|
||||
cargoLiftConveyorDeviceDriver.writing(4, Integer.parseInt(door));
|
||||
cargoLiftConveyorDeviceDriver.writing(5, Integer.parseInt(floor));
|
||||
}
|
||||
}
|
||||
if (startdevice.getDeviceDriver() instanceof HaoKaiAutoConveyorDeviceDriver) {
|
||||
haoKaiAutoConveyorDeviceDriver = (HaoKaiAutoConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||
haoKaiAutoConveyorDeviceDriver.writing(3, Integer.valueOf(dto.getInstruction_code()));
|
||||
}
|
||||
|
||||
try {
|
||||
String start_device_code = task.getStart_device_code();
|
||||
@@ -374,13 +321,26 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
throw new BadRequestException("未查询到相关路由!");
|
||||
}
|
||||
if (StrUtil.equals(route.getType(), "1")) {
|
||||
ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class);
|
||||
HttpResponse result = zheDaAgvService.sendAgvInstToAgv(dto);
|
||||
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
dto.setSend_status("2");
|
||||
XianGongAgvService xgAgvService = SpringContextHolder.getBean(XianGongAgvService.class);
|
||||
|
||||
if (StrUtil.equals(task.getRequest_again_success(), "1")) {
|
||||
//追加订单
|
||||
HttpResponse result = xgAgvService.sendOrderSequencesToXZ(dto);
|
||||
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
//创建订单序列
|
||||
HttpResponse result = xgAgvService.sendOrderSequencesToXZ(dto);
|
||||
if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -1231,6 +1191,20 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Instruction findByInstCodeFromCache(String inst_code) {
|
||||
for (int i = 0; i < this.instructions.size(); i++) {
|
||||
Instruction inst = instructions.get(i);
|
||||
if (StrUtil.equals(inst_code, inst.getInstruction_code())) {
|
||||
return inst;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public Instruction findByContainer(String container_code) {
|
||||
Iterator var3 = instructions.iterator();
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package org.nl.modules.quartz.task;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.agv.server.XianGongAgvService;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 查询AGV任务状态
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class QueryXZAgvTaskStatus {
|
||||
|
||||
@Autowired
|
||||
InstructionService instructionService;
|
||||
|
||||
@Autowired
|
||||
XianGongAgvService agvService;
|
||||
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService;
|
||||
|
||||
@Autowired
|
||||
TaskService taskService;
|
||||
|
||||
public void run() throws Exception {
|
||||
|
||||
HttpResponse response = agvService.queryXZAgvInstStatus();
|
||||
JSONObject jo = JSONArray.parseObject(response.body());
|
||||
|
||||
JSONArray ja = JSONArray.parseArray(jo.getString("list"));
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
JSONObject one = (JSONObject) ja.get(i);
|
||||
String inst_code = one.getString("id");
|
||||
Instruction inst = instructionService.findByInstCodeFromCache(inst_code);
|
||||
if (ObjectUtil.isEmpty(inst))
|
||||
continue;
|
||||
//子任务状态 待以后处理
|
||||
JSONArray blocks = JSONArray.parseArray(one.getString("blocks"));
|
||||
for(int j=0;j<blocks.size();j++){
|
||||
JSONObject blocksjo = (JSONObject) blocks.get(j);
|
||||
String blockId = blocksjo.getString("blockId");
|
||||
String device_code = blocksjo.getString("location");
|
||||
String state = blocksjo.getString("state");
|
||||
|
||||
}
|
||||
|
||||
String state = one.getString("state");
|
||||
if (!StrUtil.isEmpty(one.getString("vehicle"))) {
|
||||
String carno = one.getString("vehicle");
|
||||
inst.setCarno(carno);
|
||||
}
|
||||
|
||||
// 已创建=CREATED,
|
||||
// 待分配=TOBEDISPATCHED,
|
||||
// 正在执行=RUNNING,
|
||||
// 完成=FINISHED,
|
||||
// 失败=FAILED(主动失败),
|
||||
// 终止=STOPPED(被人为终止),
|
||||
// 无法执行=Error(参数错误),
|
||||
// 等待=WAITING
|
||||
|
||||
//执行中
|
||||
if ("RUNNING".equals(state) || "CREATED".equals(state) || "TOBEDISPATCHED".equals(state) || "WAITING".equals(state)) {
|
||||
if (inst != null) {
|
||||
inst.setInstruction_status("1");
|
||||
instructionService.update(inst);
|
||||
}
|
||||
} else if ("FINISHED".equals(state)) {
|
||||
if (inst != null) {
|
||||
inst.setInstruction_status("2");
|
||||
instructionService.finish(inst);
|
||||
}
|
||||
} else if ("STOPPED".equals(state) || "FAILED".equals(state) || "Error".equals(state)) {
|
||||
if (inst != null) {
|
||||
inst.setInstruction_status("1");
|
||||
instructionService.update(inst);
|
||||
}
|
||||
}
|
||||
// else if ("STOPPED".equals(state)){
|
||||
// if (inst != null) {
|
||||
// instructionService.cancel(inst.getInstruction_id());
|
||||
//
|
||||
// TaskDto taskDto = taskService.findByCode(inst.getTask_code());
|
||||
// taskService.cancel(taskDto.getTask_id());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,17 +6,21 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:10.16.1.25}:${DB_PORT:3306}/${DB_NAME:whxr_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:ndxy3_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:ndxy3_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:whxr_root}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
min-idle: 15
|
||||
# 最大连接数
|
||||
max-active: 60
|
||||
max-active: 30
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 5000
|
||||
max-wait: 3000
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 连接在池中最小生存的时间
|
||||
@@ -36,11 +40,8 @@ spring:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
# 控制台管理用户名和密码
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
login-username: admin
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
@@ -54,11 +55,10 @@ spring:
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:15}
|
||||
host: ${REDIS_HOST:10.16.1.25}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PWD:}
|
||||
#连接超时时间
|
||||
timeout: 5000
|
||||
|
||||
# 登录相关配置
|
||||
login:
|
||||
# 登录缓存
|
||||
@@ -77,7 +77,7 @@ login:
|
||||
heigth: 36
|
||||
# 内容长度
|
||||
length: 2
|
||||
# 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可
|
||||
# 字体名称,为空则使用默认字体
|
||||
font-name:
|
||||
# 字体大小
|
||||
font-size: 25
|
||||
@@ -89,36 +89,29 @@ jwt:
|
||||
token-start-with: Bearer
|
||||
# 必须使用最少88位的Base64对该令牌进行编码
|
||||
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
|
||||
# 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
|
||||
token-validity-in-seconds: 7200000
|
||||
# 令牌过期时间 此处单位/毫秒 ,默认4小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
|
||||
token-validity-in-seconds: 14400000
|
||||
# 在线用户key
|
||||
online-key: online-token-
|
||||
# 验证码
|
||||
code-key: code-key-
|
||||
# token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
|
||||
# token 续期检查时间范围(默认30分钟,单位毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
|
||||
detect: 1800000
|
||||
# 续期时间范围,默认 1小时,这里单位毫秒
|
||||
# 续期时间范围,默认1小时,单位毫秒
|
||||
renew: 3600000
|
||||
|
||||
#是否允许生成代码,生产环境设置为false
|
||||
generator:
|
||||
enabled: true
|
||||
|
||||
#是否开启 swagger-ui
|
||||
swagger:
|
||||
enabled: true
|
||||
|
||||
# IP 本地解析
|
||||
ip:
|
||||
local-parsing: true
|
||||
|
||||
#是否允许生成代码,生产环境设置为false
|
||||
generator:
|
||||
enabled: false
|
||||
|
||||
#如果生产环境要开启swagger,需要配置请求地址
|
||||
#springfox:
|
||||
# documentation:
|
||||
# swagger:
|
||||
# v2:
|
||||
# host: # 接口域名或外网ip
|
||||
|
||||
#是否开启 swagger-ui
|
||||
swagger:
|
||||
enabled: false
|
||||
|
||||
# 文件存储路径
|
||||
file:
|
||||
mac:
|
||||
@@ -135,5 +128,29 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: /app/jar/logs
|
||||
path: C:\log\wms
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
# token 名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# token 有效期,单位s 默认30天, -1代表永不过期
|
||||
timeout: 2592000
|
||||
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||
activity-timeout: -1
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# token风格
|
||||
token-style: random-128
|
||||
# 是否输出操作日志
|
||||
is-log: false
|
||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||
# token 前缀
|
||||
token-prefix: Bearer
|
||||
|
||||
loki:
|
||||
url: http://localhost:3100/loki/api/v1
|
||||
systemName: acs
|
||||
|
||||
Reference in New Issue
Block a user