workerThreads = workers.iterator();
+ while(workerThreads.hasNext()) {
+ WorkerThread wt = workerThreads.next();
+ wt.shutdown();
+ availWorkers.remove(wt);
+ }
+
+ // Give waiting (wait(1000)) worker threads a chance to shut down.
+ // Active worker threads will shut down after finishing their
+ // current job.
+ nextRunnableLock.notifyAll();
+
+ if (waitForJobsToComplete == true) {
+
+ boolean interrupted = false;
+ try {
+ // wait for hand-off in runInThread to complete...
+ while(handoffPending) {
+ try {
+ nextRunnableLock.wait(100);
+ } catch(InterruptedException _) {
+ interrupted = true;
+ }
+ }
+
+ // Wait until all worker threads are shut down
+ while (busyWorkers.size() > 0) {
+ WorkerThread wt = (WorkerThread) busyWorkers.getFirst();
+ try {
+ getLog().debug(
+ "Waiting for thread " + wt.getName()
+ + " to shut down");
+
+ // note: with waiting infinite time the
+ // application may appear to 'hang'.
+ nextRunnableLock.wait(2000);
+ } catch (InterruptedException _) {
+ interrupted = true;
+ }
+ }
+
+ workerThreads = workers.iterator();
+ while(workerThreads.hasNext()) {
+ WorkerThread wt = (WorkerThread) workerThreads.next();
+ try {
+ wt.join();
+ workerThreads.remove();
+ } catch (InterruptedException _) {
+ interrupted = true;
+ }
+ }
+ } finally {
+ if (interrupted) {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ getLog().debug("No executing jobs remaining, all threads stopped.");
+ }
+ getLog().debug("Shutdown of threadpool complete.");
+ }
+ }
+
+ /**
+ *
+ * Run the given Runnable object in the next available
+ * Thread. If while waiting the thread pool is asked to
+ * shut down, the Runnable is executed immediately within a new additional
+ * thread.
+ *
+ *
+ * @param runnable
+ * the Runnable to be added.
+ */
+ public boolean runInThread(Runnable runnable) {
+ if (runnable == null) {
+ return false;
+ }
+
+ synchronized (nextRunnableLock) {
+
+ handoffPending = true;
+
+ // Wait until a worker thread is available
+ while ((availWorkers.size() < 1) && !isShutdown) {
+ try {
+ nextRunnableLock.wait(500);
+ } catch (InterruptedException ignore) {
+ }
+ }
+
+ if (!isShutdown) {
+ WorkerThread wt = (WorkerThread)availWorkers.removeFirst();
+ busyWorkers.add(wt);
+ wt.run(runnable);
+ } else {
+ // If the thread pool is going down, execute the Runnable
+ // within a new additional worker thread (no thread from the pool).
+ WorkerThread wt = new WorkerThread(this, threadGroup,
+ "WorkerThread-LastJob", prio, isMakeThreadsDaemons(), runnable);
+ busyWorkers.add(wt);
+ workers.add(wt);
+ wt.start();
+ }
+ nextRunnableLock.notifyAll();
+ handoffPending = false;
+ }
+
+ return true;
+ }
+
+ public int blockForAvailableThreads() {
+ synchronized(nextRunnableLock) {
+
+ while((availWorkers.size() < 1 || handoffPending) && !isShutdown) {
+ try {
+ nextRunnableLock.wait(500);
+ } catch (InterruptedException ignore) {
+ }
+ }
+
+ return availWorkers.size();
+ }
+ }
+
+ protected void makeAvailable(WorkerThread wt) {
+ synchronized(nextRunnableLock) {
+ if(!isShutdown) {
+ availWorkers.add(wt);
+ }
+ busyWorkers.remove(wt);
+ nextRunnableLock.notifyAll();
+ }
+ }
+
+ protected void clearFromBusyWorkersList(WorkerThread wt) {
+ synchronized(nextRunnableLock) {
+ busyWorkers.remove(wt);
+ nextRunnableLock.notifyAll();
+ }
+ }
+
+ /*
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ * WorkerThread Class.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+ /**
+ *
+ * A Worker loops, waiting to execute tasks.
+ *
+ */
+ class WorkerThread extends Thread {
+
+ private final Object lock = new Object();
+
+ // A flag that signals the WorkerThread to terminate.
+ private AtomicBoolean run = new AtomicBoolean(true);
+
+ private SimpleThreadPool tp;
+
+ private Runnable runnable = null;
+
+ private boolean runOnce = false;
+
+ /**
+ *
+ * Create a worker thread and start it. Waiting for the next Runnable,
+ * executing it, and waiting for the next Runnable, until the shutdown
+ * flag is set.
+ *
+ */
+ WorkerThread(SimpleThreadPool tp, ThreadGroup threadGroup, String name,
+ int prio, boolean isDaemon) {
+
+ this(tp, threadGroup, name, prio, isDaemon, null);
+ }
+
+ /**
+ *
+ * Create a worker thread, start it, execute the runnable and terminate
+ * the thread (one time execution).
+ *
+ */
+ WorkerThread(SimpleThreadPool tp, ThreadGroup threadGroup, String name,
+ int prio, boolean isDaemon, Runnable runnable) {
+
+ super(threadGroup, name);
+ this.tp = tp;
+ this.runnable = runnable;
+ if(runnable != null)
+ runOnce = true;
+ setPriority(prio);
+ setDaemon(isDaemon);
+ }
+
+ /**
+ *
+ * Signal the thread that it should terminate.
+ *
+ */
+ void shutdown() {
+ run.set(false);
+ }
+
+ public void run(Runnable newRunnable) {
+ synchronized(lock) {
+ if(runnable != null) {
+ throw new IllegalStateException("Already running a Runnable!");
+ }
+
+ runnable = newRunnable;
+ lock.notifyAll();
+ }
+ }
+
+ /**
+ *
+ * Loop, executing targets as they are received.
+ *
+ */
+ @Override
+ public void run() {
+ boolean ran = false;
+
+ while (run.get()) {
+ try {
+ synchronized(lock) {
+ while (runnable == null && run.get()) {
+ lock.wait(500);
+ }
+
+ if (runnable != null) {
+ ran = true;
+ runnable.run();
+ }
+ }
+ } catch (InterruptedException unblock) {
+ // do nothing (loop will terminate if shutdown() was called
+ try {
+ getLog().error("Worker thread was interrupt()'ed.", unblock);
+ } catch(Exception e) {
+ // ignore to help with a tomcat glitch
+ }
+ } catch (Throwable exceptionInRunnable) {
+ try {
+ getLog().error("Error while executing the Runnable: ",
+ exceptionInRunnable);
+ } catch(Exception e) {
+ // ignore to help with a tomcat glitch
+ }
+ } finally {
+ synchronized(lock) {
+ runnable = null;
+ }
+ // repair the thread in case the runnable mucked it up...
+ if(getPriority() != tp.getThreadPriority()) {
+ setPriority(tp.getThreadPriority());
+ }
+
+ if (runOnce) {
+ run.set(false);
+ clearFromBusyWorkersList(this);
+ } else if(ran) {
+ ran = false;
+ makeAvailable(this);
+ }
+
+ }
+ }
+
+ //if (log.isDebugEnabled())
+ try {
+ getLog().debug("WorkerThread is shut down.");
+ } catch(Exception e) {
+ // ignore to help with a tomcat glitch
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/QuartzConfig.java b/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/QuartzConfig.java
index c00c0f3..a6a6526 100644
--- a/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/QuartzConfig.java
+++ b/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/QuartzConfig.java
@@ -1,5 +1,6 @@
package org.nl.system.service.quartz.config;
+import com.dtp.core.thread.DtpExecutor;
import org.quartz.Scheduler;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
@@ -21,7 +22,7 @@ public class QuartzConfig {
* 解决Job中注入Spring Bean为null的问题
*/
@Component("quartzJobFactory")
- public static class QuartzJobFactory extends AdaptableJobFactory {
+ public class QuartzJobFactory extends AdaptableJobFactory {
private final AutowireCapableBeanFactory capableBeanFactory;
@@ -46,8 +47,9 @@ public class QuartzConfig {
* @throws Exception /
*/
@Bean(name = "scheduler")
- public Scheduler scheduler(QuartzJobFactory quartzJobFactory) throws Exception {
+ public Scheduler scheduler(QuartzJobFactory quartzJobFactory, DtpExecutor e) throws Exception {
SchedulerFactoryBean factoryBean=new SchedulerFactoryBean();
+ factoryBean.setTaskExecutor(e);
factoryBean.setJobFactory(quartzJobFactory);
factoryBean.afterPropertiesSet();
Scheduler scheduler=factoryBean.getScheduler();
diff --git a/nladmin-system/nlsso-server/src/main/resources/application.yml b/nladmin-system/nlsso-server/src/main/resources/application.yml
deleted file mode 100644
index df46a2c..0000000
--- a/nladmin-system/nlsso-server/src/main/resources/application.yml
+++ /dev/null
@@ -1,120 +0,0 @@
-# 端口
-server:
- port: 9000
-
-# Sa-Token 配置
-sa-token:
- # ------- SSO-模式一相关配置 (非模式一不需要配置)
-
-# 配置 Cookie 作用域
-
-# ------- SSO-模式二相关配置
- sso:
- # Ticket有效期 (单位: 秒),默认五分钟
- ticket-timeout: 300
- # 所有允许的授权回调地址比较重要
- allow-url: "*"
- # 是否打开单点注销功能
- is-slo: true
- # ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
-# # 是否打开模式三
- isHttp: true
-# # 接口调用秘钥(用于SSO模式三的单点注销功能)
- secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
- token-name: EL-ADMIN-TOEKN
-# # ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
-#
-spring:
- #配置 Jpa
- jpa:
- hibernate:
- ddl-auto: none
- open-in-view: true
- properties:
- hibernate:
- dialect: org.hibernate.dialect.MySQL5InnoDBDialect
- enable_lazy_load_no_trans: true
- # 数据源
- datasource:
- druid:
- db-type: com.alibaba.druid.pool.DruidDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- # url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:whxr_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
- url: jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:whxr}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
- username: ${DB_USER:root}
- password: ${DB_PWD:P@ssw0rd}
- # username: ${DB_USER:root}
- # password: ${DB_PWD:root}
- # 初始连接数
- initial-size: 5
- # 最小连接数
- min-idle: 15
- # 最大连接数
- max-active: 30
- # 是否自动回收超时连接
- remove-abandoned: true
- # 超时时间(以秒数为单位)
- remove-abandoned-timeout: 180
- # 获取连接超时时间
- max-wait: 300
- # 连接有效性检测时间
- time-between-eviction-runs-millis: 60000
- # 连接在池中最小生存的时间
- min-evictable-idle-time-millis: 300000
- # 连接在池中最大生存的时间
- max-evictable-idle-time-millis: 900000
- # 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
- test-while-idle: true
- # 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
- test-on-borrow: true
- # 是否在归还到池中前进行检验
- test-on-return: false
- # 检测连接是否有效
- validation-query: select 1
- # 配置监控统计
-# webStatFilter:
-# enabled: true
-# stat-view-servlet:
-# enabled: true
-# url-pattern: /druid/*
-# reset-enable: false
-# filter:
-# stat:
-# enabled: true
-# # 记录慢SQL
-# log-slow-sql: true
-# slow-sql-millis: 1000
-# merge-sql: true
-# wall:
-# config:
-# multi-statement-allow: true
-
- # Redis配置 (SSO模式一和模式二使用Redis来同步会话)
- redis:
- # Redis数据库索引(默认为0)
- database: 1
- # Redis服务器地址
- host: 47.96.133.178
- # Redis服务器连接端口
- port: 6479
- # Redis服务器连接密码(默认为空)
- password: 942464Yy
- # 连接超时时间
- timeout: 10s
- lettuce:
- pool:
- # 连接池最大连接数
- max-active: 200
- # 连接池最大阻塞等待时间(使用负值表示没有限制)
- max-wait: -1ms
- # 连接池中的最大空闲连接
- max-idle: 10
- # 连接池中的最小空闲连接
- min-idle: 0
-
-forest:
- # 关闭 forest 请求日志打印
- log-enabled: false
-
-
-
diff --git a/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml b/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml
index 321b80f..6d8589b 100644
--- a/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml
+++ b/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml
@@ -6,10 +6,10 @@ 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:nl-sso-server}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
-# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:yongyu_lms2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
+# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:nl-sso-server}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
+ url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:nl_platform}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root}
- password: ${DB_PWD:Root.123456}
+ password: ${DB_PWD:root}
# password: ${DB_PWD:12356}
# 初始连接数
initial-size: 5
@@ -57,8 +57,75 @@ spring:
database: ${REDIS_DB:2}
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
- password: ${REDIS_PWD:}
-
+ flyway: # flyway 数据库 DDL 版本控制
+ enabled: true # 正式环境才开启
+ clean-disabled: true # 禁用数据库清理
+ encoding: UTF-8
+ locations: classpath:db
+ # flyway 会在库中创建此名称元数据表,用于记录所有版本演化和状态,同一个库不同项目可能冲突,每个项目一张表来记录
+ table: flyway_schema_history_nl_platform #TODO 值的后缀指定为当前项目名称
+ baseline-version: 1 # 基线版本默认开始序号 默认为 1
+ baseline-on-migrate: true # 针对非空数据库是否默认调用基线版本,为空的话默认会调用基线版本
+ placeholders: # 定义 afterMigrateError.sql 要清理的元数据表表名
+ flyway-table: ${spring.flyway.table}
+ dynamic:
+ tp:
+ enabled: true
+ enabledBanner: true # 是否开启banner打印,默认true
+ enabledCollect: true # 是否开启监控指标采集,默认false
+ collectorTypes: micrometer,logging # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
+ logPath: /home/logs888 # 监控日志数据路径,默认 ${user.home}/logs
+ monitorInterval: 5 # 监控时间间隔(报警判断、指标采集),默认5s
+ tomcatTp: # tomcat web server线程池配置
+ corePoolSize: 100
+ maximumPoolSize: 400
+ keepAliveTime: 60
+ executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
+ - threadPoolName: dtpExecutor1
+ executorType: common # 线程池类型common、eager:适用于io密集型
+ corePoolSize: 6
+ maximumPoolSize: 8
+ queueCapacity: 200
+ queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类
+ rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类
+ keepAliveTime: 50
+ allowCoreThreadTimeOut: false # 是否允许核心线程池超时
+ threadNamePrefix: test # 线程名前缀
+ waitForTasksToCompleteOnShutdown: false # 参考spring线程池设计,优雅关闭线程池
+ awaitTerminationSeconds: 5 # 单位(s)
+ preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
+ runTimeout: 200 # 任务执行超时阈值,目前只做告警用,单位(ms)
+ queueTimeout: 100 # 任务在队列等待超时阈值,目前只做告警用,单位(ms)
+ taskWrapperNames: [ "ttl" ] # 任务包装器名称,集成TaskWrapper接口
+ notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
+ - type: capacity # 报警项类型,查看源码 NotifyTypeEnum枚举类
+ enabled: true
+ threshold: 80 # 报警阈值
+ platforms: [ ding,wechat ] # 可选配置,不配置默认拿上层platforms配置的所以平台
+ interval: 120 # 报警间隔(单位:s)
+ - type: change
+ enabled: true
+ - type: liveness
+ enabled: true
+ threshold: 80
+ - type: reject
+ enabled: true
+ threshold: 1
+ - type: run_timeout
+ enabled: true
+ threshold: 1
+ - type: queue_timeout
+ enabled: true
+ threshold: 1
+ quartz:
+ properties:
+ org:
+ quartz:
+ jobStore:
+ threadPool:
+ threadCount: 14
+ class: org.nl.system.service.quartz.SimpleThreadPool
+ scheduler-name: scheduler
# 登录相关配置
login:
# 登录缓存
@@ -160,9 +227,4 @@ sa-token:
# Redis服务器连接密码(默认为空)
password:
# 连接超时时间
- timeout: 10s
-
-
-loki:
- url: http://localhost:3100/loki/api/v1
- systemName: acs
+ timeout: 10s
\ No newline at end of file
diff --git a/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml b/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
index 1d3bb43..1a7570b 100644
--- a/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
+++ b/nladmin-system/nlsso-server/src/main/resources/config/application-prod.yml
@@ -56,7 +56,6 @@ spring:
database: ${REDIS_DB:15}
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
- password: ${REDIS_PWD:}
#连接超时时间
timeout: 5000
# 登录相关配置
@@ -159,7 +158,3 @@ sa-token:
token-prefix: Bearer
is-read-cookie: false
is-read-body: false
-
-loki:
- url: http://localhost:3100/loki/api/v1
- systemName: lms
diff --git a/nladmin-system/nlsso-server/src/main/resources/config/application-test.yml b/nladmin-system/nlsso-server/src/main/resources/config/application-test.yml
index d5f3408..59bc8ff 100644
--- a/nladmin-system/nlsso-server/src/main/resources/config/application-test.yml
+++ b/nladmin-system/nlsso-server/src/main/resources/config/application-test.yml
@@ -156,8 +156,4 @@ sa-token:
is-log: false
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
# token 前缀
- token-prefix: Bearer
-
-loki:
- url: http://localhost:3100/loki/api/v1
- systemName: lms
+ token-prefix: Bearer
\ No newline at end of file
diff --git a/nladmin-system/nlsso-server/src/main/resources/config/application.yml b/nladmin-system/nlsso-server/src/main/resources/config/application.yml
index 2878f27..16b80c0 100644
--- a/nladmin-system/nlsso-server/src/main/resources/config/application.yml
+++ b/nladmin-system/nlsso-server/src/main/resources/config/application.yml
@@ -9,44 +9,22 @@ spring:
redis:
repositories:
enabled: false
-
- #配置 Jpa
- jpa:
- hibernate:
- ddl-auto: none
- open-in-view: true
- properties:
- hibernate:
- dialect: org.hibernate.dialect.MySQL5InnoDBDialect
- enable_lazy_load_no_trans: true
+#密码加密传输,前端公钥加密,后端私钥解密
+rsa:
+ private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
+logging:
+ config: classpath:logback-spring.xml
+# sa-token白名单配置
task:
pool:
# 核心线程池大小
- core-pool-size: 10
+ core-pool-size: 12
# 最大线程数
max-pool-size: 30
# 活跃时间
keep-alive-seconds: 60
# 队列容量
queue-capacity: 50
-
-#七牛云
-qiniu:
- # 文件大小 /M
- max-size: 15
-
-#邮箱验证码有效时间/秒
-code:
- expiration: 300
-
-#密码加密传输,前端公钥加密,后端私钥解密
-rsa:
- private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
-logging:
- file:
- path: C:\log\wms
- config: classpath:logback-spring.xml
-# sa-token白名单配置
security:
# 排除路径
excludes:
@@ -80,12 +58,35 @@ security:
- /api/localStorage/pictures
# 参数
- /api/param/getValueByCode
+ - /plumelog/**
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
mapper-locations:
- classpath:org.nl.**.mapper/*.xml
global-config:
db-config:
id-type: INPUT
+plumelog:
+ model: redis #值为4种 redis,kafka,rest,restServer,lite
+ lite:
+ log:
+ path: /lucene2
+redisson:
+ # redis key前缀
+ keyPrefix:
+ # 线程池数量
+ threads: 4
+ # Netty线程池数量
+ nettyThreads: 8
+ # 单节点配置
+ singleServerConfig:
+ # 最小空闲连接数
+ connectionMinimumIdleSize: 4
+ # 连接池大小
+ connectionPoolSize: 8
+ # 连接空闲超时,单位:毫秒
+ idleConnectionTimeout: 10000
+ # 命令等待超时,单位:毫秒
+ timeout: 3000
diff --git a/nladmin-system/nlsso-server/src/main/resources/db/V1.0.0__初始化.sql b/nladmin-system/nlsso-server/src/main/resources/db/V1.0.0__初始化.sql
new file mode 100644
index 0000000..b50bd3c
--- /dev/null
+++ b/nladmin-system/nlsso-server/src/main/resources/db/V1.0.0__初始化.sql
@@ -0,0 +1,8 @@
+CREATE TABLE `t_javastack` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(20) NOT NULL COMMENT '姓名',
+ `age` int(5) DEFAULT NULL COMMENT '年龄',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+
diff --git a/nladmin-system/nlsso-server/src/main/resources/db/V2.0.0__初始化.sql b/nladmin-system/nlsso-server/src/main/resources/db/V2.0.0__初始化.sql
new file mode 100644
index 0000000..b50bd3c
--- /dev/null
+++ b/nladmin-system/nlsso-server/src/main/resources/db/V2.0.0__初始化.sql
@@ -0,0 +1,8 @@
+CREATE TABLE `t_javastack` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(20) NOT NULL COMMENT '姓名',
+ `age` int(5) DEFAULT NULL COMMENT '年龄',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+
diff --git a/nladmin-system/nlsso-server/src/main/resources/db/V3.0.0__初始化.sql b/nladmin-system/nlsso-server/src/main/resources/db/V3.0.0__初始化.sql
new file mode 100644
index 0000000..4ee4b27
--- /dev/null
+++ b/nladmin-system/nlsso-server/src/main/resources/db/V3.0.0__初始化.sql
@@ -0,0 +1,8 @@
+CREATE TABLE `t2_javastack` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(20) NOT NULL COMMENT '姓名',
+ `age` int(5) DEFAULT NULL COMMENT '年龄',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+
diff --git a/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml b/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
index 3e68ee7..41a3f04 100644
--- a/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
+++ b/nladmin-system/nlsso-server/src/main/resources/logback-spring.xml
@@ -14,9 +14,6 @@ https://juejin.cn/post/6844903775631572999
-
-
-
@@ -58,28 +55,20 @@ https://juejin.cn/post/6844903775631572999
-
-
- 1000
-
- ${LOKI_URL}/push
-
-
-
-
- ${log.pattern}
-
- true
-
+
+ plumelog
+
+ /plumelog/lite
+
+ 30
+ sleuth
-
+
@@ -124,55 +113,55 @@ https://juejin.cn/post/6844903775631572999
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/nladmin-system/pom.xml b/nladmin-system/pom.xml
index 7a21fba..cfdd1df 100644
--- a/nladmin-system/pom.xml
+++ b/nladmin-system/pom.xml
@@ -11,7 +11,6 @@
nlsso-server
- nlsso-client
pom
org.nl
@@ -22,9 +21,6 @@
1.31.0
-
-
-