Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51dd68b9be | |||
| ee04e1fcf0 |
@@ -595,6 +595,32 @@
|
||||
<mainClass>org.nl.AppRun</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- ClassFinal 字节码加密插件 -->
|
||||
<plugin>
|
||||
<groupId>com.gitee.lcm742320521</groupId>
|
||||
<artifactId>classfinal-maven-plugin</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<configuration>
|
||||
<!-- 加密密码,请务必修改为强密码并妥善保管 -->
|
||||
<password>nl2024</password>
|
||||
<!-- 需要加密的包名,多个包用逗号分隔,通常为核心业务包 -->
|
||||
<packages>org.nl</packages>
|
||||
<!-- 需要加密的配置文件,如 yml/properties -->
|
||||
<cfgfiles>application.yml,application-dev.yml,application-prod.yml,application-prod2.yml</cfgfiles>
|
||||
<!-- 排除某些包(如实体类、DTO),避免加密后影响框架使用 -->
|
||||
<excludes>org.nl.**.domain.**</excludes>
|
||||
<!-- 可选:绑定机器码,使加密后的jar包只能在指定机器上运行 -->
|
||||
<!-- <code>目标机器的唯一标识码</code> -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>classFinal</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 跳过单元测试 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class AbstractAutoRunnable implements Runnable {
|
||||
try {
|
||||
this.before();
|
||||
//子类该方法是个死循环
|
||||
this.autoRun();
|
||||
// this.autoRun();
|
||||
this.setStopMessage(true_clear);
|
||||
} catch (Throwable arg5) {
|
||||
log.warn("", arg5);
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Repository;
|
||||
public interface DeviceMapper extends CommonMapper<Device> {
|
||||
String QUERY_DEVICE_SQL = "SELECT d.*, dict.label AS device_type_name, dict2.label AS region_name " +
|
||||
"FROM " +
|
||||
"ACS_DEVICE d " +
|
||||
"acs_device d " +
|
||||
"LEFT JOIN sys_dict dict ON dict.value = d.device_type " +
|
||||
"AND dict.`code` = 'device_type' " +
|
||||
"LEFT JOIN sys_dict dict2 ON dict2.value = d.region " +
|
||||
|
||||
@@ -74,46 +74,46 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable {
|
||||
|
||||
@Override
|
||||
public void autoRun() throws Exception {
|
||||
for (int i = 0; !OpcStartTag.is_run; ++i) {
|
||||
log.info("设备执行线程等待opc同步线程...");
|
||||
Thread.sleep(1000L);
|
||||
if (i > 60) {
|
||||
log.info("设备执行线程放弃等待opc同步线程...");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// for (int i = 0; !OpcStartTag.is_run; ++i) {
|
||||
// log.info("设备执行线程等待opc同步线程...");
|
||||
// Thread.sleep(1000L);
|
||||
// if (i > 60) {
|
||||
// log.info("设备执行线程放弃等待opc同步线程...");
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Thread.sleep(10000L);
|
||||
// log.info("设备执行线程开始...");
|
||||
|
||||
Thread.sleep(10000L);
|
||||
log.info("设备执行线程开始...");
|
||||
|
||||
while (true) {
|
||||
Thread.sleep((long) this.loop_time_millions);
|
||||
List<ExecutableDeviceDriver> deviceDrivers = this.deviceAppService.findDeviceDriver(ExecutableDeviceDriver.class);
|
||||
|
||||
Iterator it = deviceDrivers.iterator();
|
||||
while (it.hasNext()) {
|
||||
final ExecutableDeviceDriver deviceDriver = (ExecutableDeviceDriver) it.next();
|
||||
//不包含正在执行的线程,则进行执行
|
||||
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||
BlockedRunable runnable = new BlockedRunable() {
|
||||
@Override
|
||||
public void subRun() {
|
||||
deviceDriver.executeAuto();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
return deviceDriver.getDeviceCode();
|
||||
}
|
||||
};
|
||||
if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||
this.runs.put(deviceDriver.getDeviceCode(), runnable);
|
||||
}
|
||||
|
||||
runnable.setIndex(this.runs);
|
||||
this.executorService.submit(runnable);
|
||||
}
|
||||
}
|
||||
}
|
||||
// while (false) {
|
||||
// Thread.sleep((long) this.loop_time_millions);
|
||||
// List<ExecutableDeviceDriver> deviceDrivers = this.deviceAppService.findDeviceDriver(ExecutableDeviceDriver.class);
|
||||
//
|
||||
// Iterator it = deviceDrivers.iterator();
|
||||
// while (it.hasNext()) {
|
||||
// final ExecutableDeviceDriver deviceDriver = (ExecutableDeviceDriver) it.next();
|
||||
// //不包含正在执行的线程,则进行执行
|
||||
// if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||
// BlockedRunable runnable = new BlockedRunable() {
|
||||
// @Override
|
||||
// public void subRun() {
|
||||
// deviceDriver.executeAuto();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getCode() {
|
||||
// return deviceDriver.getDeviceCode();
|
||||
// }
|
||||
// };
|
||||
// if (!this.runs.keySet().contains(deviceDriver.getDeviceCode())) {
|
||||
// this.runs.put(deviceDriver.getDeviceCode(), runnable);
|
||||
// }
|
||||
//
|
||||
// runnable.setIndex(this.runs);
|
||||
// this.executorService.submit(runnable);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public class SocketListenerAutoRun extends AbstractAutoRunnable implements Socke
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SocketListenerAutoRun run = new SocketListenerAutoRun();
|
||||
run.before();
|
||||
run.autoRun();
|
||||
// SocketListenerAutoRun run = new SocketListenerAutoRun();
|
||||
// run.before();
|
||||
// run.autoRun();
|
||||
|
||||
while (true) {
|
||||
Thread.sleep(1000L);
|
||||
}
|
||||
// while (true) {
|
||||
// Thread.sleep(1000L);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1607,15 +1607,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
//TODO 有需要根据上位系统反馈的信息再做进一步处理
|
||||
CompletableFuture.runAsync(() -> {
|
||||
acstowmsService.feedTaskStatus(ja);
|
||||
// 异步更新任务状态
|
||||
try {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
acstowmsService.feedTaskStatus(ja);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 8010
|
||||
port: 8015
|
||||
#配置数据源
|
||||
spring:
|
||||
messages:
|
||||
@@ -8,12 +8,9 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:acs_huayu}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.0.242}:${DB_PORT:3306}/${DB_NAME:stand_acs_kit}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
@@ -73,19 +70,22 @@ spring:
|
||||
# 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表
|
||||
baseline-on-migrate: true
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:2}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
redisson:
|
||||
threads: 8
|
||||
netty-threads: 8
|
||||
single-server-config:
|
||||
address: "redis://127.0.0.1:6379"
|
||||
connection-pool-size: 100
|
||||
connection-minimum-idle-size: 20
|
||||
idle-connection-timeout: 30000
|
||||
connect-timeout: 10000
|
||||
timeout: 5000
|
||||
retry-attempts: 5
|
||||
retry-interval: 2000
|
||||
ping-connection-interval: 30000
|
||||
keep-alive: true
|
||||
jpa:
|
||||
show-sql: true
|
||||
rabbitmq:
|
||||
host: 192.168.101.1 # 主机名
|
||||
port: 5672 # 端口
|
||||
virtual-host: / # 虚拟主机
|
||||
username: itcast # 用户名
|
||||
password: 123321 # 密码
|
||||
# password: ${REDIS_PWD:}
|
||||
|
||||
# 登录相关配置
|
||||
login:
|
||||
@@ -124,8 +124,8 @@ file:
|
||||
path: ~/file/
|
||||
avatar: ~/avatar/
|
||||
linux:
|
||||
path: /home/eladmin/file/
|
||||
avatar: /home/eladmin/avatar/
|
||||
path: /root/acs/file/
|
||||
avatar: /root/acs/avatar/
|
||||
windows:
|
||||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
@@ -134,11 +134,11 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: D:\log\beian\lms # /Users/onepiece/myFile/acs_logs
|
||||
path: /root/acs/log
|
||||
config: classpath:logback-spring.xml
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene\index
|
||||
path: /root/acs/index
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 8010
|
||||
port: 8015
|
||||
#配置数据源
|
||||
spring:
|
||||
messages:
|
||||
@@ -8,11 +8,8 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:beian_xinshengacs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hyjm_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:stand_acs_kit}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:Root.123456}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
@@ -73,10 +70,20 @@ spring:
|
||||
# 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表
|
||||
baseline-on-migrate: true
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:2}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
redisson:
|
||||
threads: 8
|
||||
netty-threads: 8
|
||||
single-server-config:
|
||||
address: "redis://127.0.0.1:6379"
|
||||
connection-pool-size: 100
|
||||
connection-minimum-idle-size: 20
|
||||
idle-connection-timeout: 30000
|
||||
connect-timeout: 10000
|
||||
timeout: 5000
|
||||
retry-attempts: 5
|
||||
retry-interval: 2000
|
||||
ping-connection-interval: 30000
|
||||
keep-alive: true
|
||||
jpa:
|
||||
show-sql: true
|
||||
|
||||
@@ -117,8 +124,8 @@ file:
|
||||
path: ~/file/
|
||||
avatar: ~/avatar/
|
||||
linux:
|
||||
path: /home/eladmin/file/
|
||||
avatar: /home/eladmin/avatar/
|
||||
path: /root/acs/file/
|
||||
avatar: /root/acs/avatar/
|
||||
windows:
|
||||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
@@ -127,11 +134,11 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: D:\log\beian\acs # /Users/onepiece/myFile/acs_logs
|
||||
path: /root/acs/log
|
||||
config: classpath:logback-spring.xml
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene\index
|
||||
path: /root/acs/index
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
|
||||
@@ -6,9 +6,9 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: prod
|
||||
active: dev
|
||||
# active: dev
|
||||
# active: prod
|
||||
# active: prod2
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
@@ -49,7 +49,7 @@ spring:
|
||||
enabledBanner: false # 是否启用 控制台banner,默认true
|
||||
enabledCollect: true # 是否开启监控指标采集,默认true
|
||||
collectorTypes: logging,test_collect # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
||||
logPath: C:\log\lms # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
||||
logPath: /root/acs/lms # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
||||
monitorInterval: 8
|
||||
tomcatTp: # tomcat webserver 线程池配置
|
||||
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
||||
@@ -107,7 +107,7 @@ rsa:
|
||||
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
||||
logging:
|
||||
file:
|
||||
path: D:\log\beian\acs
|
||||
path: /root/acs/log
|
||||
config: classpath:logback-spring.xml
|
||||
# sa-token白名单配置
|
||||
security:
|
||||
@@ -148,4 +148,4 @@ mybatis-plus:
|
||||
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene\index
|
||||
path: /root/acs/index
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8010'
|
||||
VUE_APP_BASE_API: 'http://192.168.0.242:8015'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://10.62.3.156:8010'
|
||||
VUE_APP_BASE_API: 'http://192.168.0.242:8015'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ ENV = 'development'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_BASE_API = 'http://localhost:8011'
|
||||
VUE_APP_WS_API = 'ws://localhost:801'
|
||||
VUE_APP_WS_API = 'ws://localhost:8011'
|
||||
|
||||
# 是否启用 babel-plugin-dynamic-import-node插件
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
window.g = {
|
||||
dev: {
|
||||
VUE_APP_BASE_API: 'http://127.0.0.1:8011'
|
||||
VUE_APP_BASE_API: 'http://192.168.0.242:8011'
|
||||
},
|
||||
prod: {
|
||||
VUE_APP_BASE_API: 'http://10.62.3.156:8011'
|
||||
VUE_APP_BASE_API: 'http://192.168.0.242:8011'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -311,6 +311,32 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- ClassFinal 字节码加密插件 -->
|
||||
<plugin>
|
||||
<groupId>com.gitee.lcm742320521</groupId>
|
||||
<artifactId>classfinal-maven-plugin</artifactId>
|
||||
<version>1.4.1</version>
|
||||
<configuration>
|
||||
<!-- 加密密码,请务必修改为强密码并妥善保管 -->
|
||||
<password>nl2024</password>
|
||||
<!-- 需要加密的包名,多个包用逗号分隔,通常为核心业务包 -->
|
||||
<packages>org.nl</packages>
|
||||
<!-- 需要加密的配置文件,如 yml/properties -->
|
||||
<cfgfiles>application.yml,application-dev.yml,application-prod.yml,application-prod2.yml</cfgfiles>
|
||||
<!-- 排除某些包(如实体类、DTO),避免加密后影响框架使用 -->
|
||||
<excludes>org.nl.**.domain.**</excludes>
|
||||
<!-- 可选:绑定机器码,使加密后的jar包只能在指定机器上运行 -->
|
||||
<!-- <code>目标机器的唯一标识码</code> -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>classFinal</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
|
||||
@@ -112,7 +112,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
// 执行中
|
||||
status = TaskStatus.EXECUTING;
|
||||
taskObj.setTask_status(acs_task_status);
|
||||
iInBillService.taskFinish(taskObj);
|
||||
// iInBillService.taskFinish(taskObj);
|
||||
} else if (ResultAcsStatus.FINISHED.getCode().equals(acs_task_status)) {
|
||||
// 完成
|
||||
status = TaskStatus.FINISHED;
|
||||
|
||||
@@ -9,10 +9,10 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lms_huayu}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:P@ssw0rd}
|
||||
# 初始连接数
|
||||
initial-size: 15
|
||||
# 最小连接数
|
||||
@@ -31,7 +31,7 @@ spring:
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除`
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: false
|
||||
@@ -54,24 +54,20 @@ spring:
|
||||
keep-alive-between-time-millis: 20000
|
||||
|
||||
redis:
|
||||
#数据库索引
|
||||
database: ${REDIS_DB:1}
|
||||
#host: ${REDIS_HOST:127.0.0.1}
|
||||
host: ${REDIS_HOST:localhost}
|
||||
port: ${REDIS_PORT:6379}
|
||||
#连接超时时间
|
||||
timeout: 5000
|
||||
redisson:
|
||||
config: |
|
||||
threads: 4
|
||||
nettyThreads: 4
|
||||
singleServerConfig:
|
||||
connectionMinimumIdleSize: 8
|
||||
connectionPoolSize: 8
|
||||
address: redis://127.0.0.1:6379
|
||||
idleConnectionTimeout: 10000
|
||||
timeout: 3000
|
||||
|
||||
threads: 8
|
||||
netty-threads: 8
|
||||
single-server-config:
|
||||
address: "redis://127.0.0.1:6379"
|
||||
connection-pool-size: 100
|
||||
connection-minimum-idle-size: 20
|
||||
idle-connection-timeout: 30000
|
||||
connect-timeout: 10000
|
||||
timeout: 5000
|
||||
retry-attempts: 5
|
||||
retry-interval: 2000
|
||||
ping-connection-interval: 30000
|
||||
keep-alive: true
|
||||
# 登录相关配置
|
||||
login:
|
||||
# 登录缓存
|
||||
@@ -135,4 +131,4 @@ sa-token:
|
||||
is-print: false
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lms\lucene\index
|
||||
path: /root/wms/index
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
server:
|
||||
port: 8011
|
||||
#配置数据源
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
allow-circular-references: true
|
||||
datasource:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
# 初始连接数
|
||||
initial-size: 15
|
||||
# 最小连接数
|
||||
min-idle: 25
|
||||
# 最大连接数
|
||||
max-active: 40
|
||||
# 是否自动回收超时连接
|
||||
remove-abandoned: true
|
||||
# 超时时间(以秒数为单位)
|
||||
remove-abandoned-timeout: 180
|
||||
# 获取连接超时时间
|
||||
max-wait: 9000
|
||||
# 连接有效性检测时间
|
||||
time-between-eviction-runs-millis: 20000
|
||||
# 连接在池中最小生存的时间
|
||||
min-evictable-idle-time-millis: 300000
|
||||
# 连接在池中最大生存的时间
|
||||
max-evictable-idle-time-millis: 900000
|
||||
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除`
|
||||
test-while-idle: true
|
||||
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
||||
test-on-borrow: false
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 1 from dual
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
allow: 127.0.0.1
|
||||
filters:
|
||||
DruidFilter,stat
|
||||
log-abandoned: false
|
||||
keep-alive: true
|
||||
keep-alive-between-time-millis: 20000
|
||||
|
||||
redis:
|
||||
redisson:
|
||||
threads: 8
|
||||
netty-threads: 8
|
||||
single-server-config:
|
||||
address: "redis://127.0.0.1:6379"
|
||||
connection-pool-size: 100
|
||||
connection-minimum-idle-size: 20
|
||||
idle-connection-timeout: 30000
|
||||
connect-timeout: 10000
|
||||
timeout: 5000
|
||||
retry-attempts: 5
|
||||
retry-interval: 2000
|
||||
ping-connection-interval: 30000
|
||||
keep-alive: true
|
||||
# 登录相关配置
|
||||
login:
|
||||
# 登录缓存
|
||||
cache-enable: true
|
||||
# 是否限制单用户登录
|
||||
single-login: false
|
||||
# 验证码
|
||||
login-code:
|
||||
# 验证码类型配置 查看 LoginProperties 类
|
||||
code-type: arithmetic
|
||||
# 登录图形验证码有效时间/分钟
|
||||
expiration: 2
|
||||
# 验证码高度
|
||||
width: 111
|
||||
# 验证码宽度
|
||||
heigth: 36
|
||||
# 内容长度
|
||||
length: 2
|
||||
# 字体名称,为空则使用默认字体
|
||||
font-name:
|
||||
# 字体大小
|
||||
font-size: 25
|
||||
|
||||
#jwt
|
||||
jwt:
|
||||
header: Authorization
|
||||
# 令牌前缀
|
||||
token-start-with: Bearer
|
||||
# 必须使用最少88位的Base64对该令牌进行编码
|
||||
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
|
||||
# 令牌过期时间 此处单位/毫秒 ,默认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续期
|
||||
detect: 1800000
|
||||
# 续期时间范围,默认1小时,单位毫秒
|
||||
renew: 3600000
|
||||
|
||||
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:
|
||||
is-read-cookie: false
|
||||
is-print: false
|
||||
lucene:
|
||||
index:
|
||||
path: /root/wms/index
|
||||
@@ -53,8 +53,8 @@ file:
|
||||
path: ~/file/
|
||||
avatar: ~/avatar/
|
||||
linux:
|
||||
path: /home/eladmin/file/
|
||||
avatar: /home/eladmin/avatar/
|
||||
path: /root/wms/file/
|
||||
avatar: /root/wms/avatar/
|
||||
windows:
|
||||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
@@ -63,7 +63,7 @@ file:
|
||||
avatarMaxSize: 5
|
||||
logging:
|
||||
file:
|
||||
path: D:\log\wms
|
||||
path: /root/wms/log
|
||||
config: classpath:logback-spring.xml
|
||||
# sa-token白名单配置
|
||||
security:
|
||||
@@ -111,4 +111,4 @@ mybatis-plus:
|
||||
|
||||
lucene:
|
||||
index:
|
||||
path: D:\lucene1\index
|
||||
path: /root/wms/index
|
||||
|
||||
Reference in New Issue
Block a user