Merge remote-tracking branch 'origin/admin' into lms_v1.0.0
This commit is contained in:
@@ -32,6 +32,12 @@
|
|||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!--flywaydb-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dromara.dynamictp</groupId>
|
<groupId>org.dromara.dynamictp</groupId>
|
||||||
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
|
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
|
||||||
|
|||||||
@@ -3,17 +3,15 @@ package org.nl;
|
|||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
|
||||||
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
import com.alicp.jetcache.anno.config.EnableMethodCache;
|
||||||
|
|
||||||
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
|
import org.dromara.dynamictp.core.spring.EnableDynamicTp;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.nl.common.annotation.Limit;
|
|
||||||
import org.nl.config.SpringContextHolder;
|
import org.nl.config.SpringContextHolder;
|
||||||
|
import org.springframework.boot.ApplicationArguments;
|
||||||
|
import org.springframework.boot.ApplicationRunner;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
|
||||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
@@ -21,10 +19,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启审计功能 -> @EnableJpaAuditing
|
|
||||||
* https://www.cnblogs.com/niceyoo/p/10908647.html
|
|
||||||
* https://blog.csdn.net/qq_36850813/article/details/101194250
|
|
||||||
*
|
|
||||||
* @author ldjun
|
* @author ldjun
|
||||||
* @date 2021/2/22 9:20:19
|
* @date 2021/2/22 9:20:19
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@EnableMethodCache(basePackages = "org.nl")
|
@EnableMethodCache(basePackages = "org.nl")
|
||||||
@EnableCreateCacheAnnotation
|
@EnableCreateCacheAnnotation
|
||||||
@MapperScan("org.nl.**.mapper")
|
@MapperScan("org.nl.**.mapper")
|
||||||
public class AppRun {
|
public class AppRun implements ApplicationRunner {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(AppRun.class, args);
|
SpringApplication.run(AppRun.class, args);
|
||||||
@@ -57,10 +51,14 @@ public class AppRun {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
@GetMapping("/")
|
@GetMapping("/")
|
||||||
@Limit(period = 2, count = 1)
|
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public String index() {
|
public String index() {
|
||||||
return "Backend service started successfully";
|
return "Backend service started successfully";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(ApplicationArguments args) throws Exception {
|
||||||
|
System.out.println("项目启动成功!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2019-2020 Zheng Jie
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.nl.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 用于判断是否过滤数据权限
|
|
||||||
* 1、如果没有用到 @OneToOne 这种关联关系,只需要填写 fieldName [参考:DeptQueryCriteria.class]
|
|
||||||
* 2、如果用到了 @OneToOne ,fieldName 和 joinName 都需要填写,拿UserQueryCriteria.class举例:
|
|
||||||
* 应该是 @DataPermission(joinName = "dept", fieldName = "id")
|
|
||||||
* </p>
|
|
||||||
* @author Zheng Jie
|
|
||||||
* @website https://el-admin.vip
|
|
||||||
* @date 2020-05-07
|
|
||||||
**/
|
|
||||||
@Target(ElementType.TYPE)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface DataPermission {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Entity 中的字段名称
|
|
||||||
*/
|
|
||||||
String fieldName() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Entity 中与部门关联的字段名称
|
|
||||||
*/
|
|
||||||
String joinName() default "";
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2019-2020 Zheng Jie
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package org.nl.common.annotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Zheng Jie
|
|
||||||
* @date 2019-6-4 13:52:30
|
|
||||||
*/
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface Query {
|
|
||||||
|
|
||||||
// Dong ZhaoYang 2017/8/7 基本对象的属性名
|
|
||||||
String propName() default "";
|
|
||||||
// Dong ZhaoYang 2017/8/7 查询方式
|
|
||||||
Type type() default Type.EQUAL;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询的属性名,如User类中的dept
|
|
||||||
*/
|
|
||||||
String joinName() default "";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 默认左连接
|
|
||||||
*/
|
|
||||||
Join join() default Join.LEFT;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username")
|
|
||||||
*/
|
|
||||||
String blurry() default "";
|
|
||||||
|
|
||||||
enum Type {
|
|
||||||
// jie 2019/6/4 相等
|
|
||||||
EQUAL
|
|
||||||
// Dong ZhaoYang 2017/8/7 大于等于
|
|
||||||
, GREATER_THAN
|
|
||||||
// Dong ZhaoYang 2017/8/7 小于等于
|
|
||||||
, LESS_THAN
|
|
||||||
// Dong ZhaoYang 2017/8/7 中模糊查询
|
|
||||||
, INNER_LIKE
|
|
||||||
// Dong ZhaoYang 2017/8/7 左模糊查询
|
|
||||||
, LEFT_LIKE
|
|
||||||
// Dong ZhaoYang 2017/8/7 右模糊查询
|
|
||||||
, RIGHT_LIKE
|
|
||||||
// Dong ZhaoYang 2017/8/7 小于
|
|
||||||
, LESS_THAN_NQ
|
|
||||||
// jie 2019/6/4 包含
|
|
||||||
, IN
|
|
||||||
// 不等于
|
|
||||||
,NOT_EQUAL
|
|
||||||
// between
|
|
||||||
,BETWEEN
|
|
||||||
// 不为空
|
|
||||||
,NOT_NULL
|
|
||||||
// 为空
|
|
||||||
,IS_NULL
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Zheng Jie
|
|
||||||
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
|
|
||||||
*/
|
|
||||||
enum Join {
|
|
||||||
/** jie 2019-6-4 13:18:30 */
|
|
||||||
LEFT, RIGHT, INNER
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package org.nl.start;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.boot.ApplicationArguments;
|
|
||||||
import org.springframework.boot.ApplicationRunner;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 随项目启动模块
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author generator
|
|
||||||
* @since 2023-11-16
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class Init implements ApplicationRunner {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
|
||||||
System.out.println("项目启动成功!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,143 +26,5 @@ nl:
|
|||||||
username: sa
|
username: sa
|
||||||
password: 123
|
password: 123
|
||||||
database: 马钢_RH
|
database: 马钢_RH
|
||||||
# 配置数据源
|
logging-path: C:\log\wms
|
||||||
spring:
|
dynamic-log-path: C:\log\lms
|
||||||
autoconfigure:
|
|
||||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
|
||||||
datasource:
|
|
||||||
dynamic:
|
|
||||||
primary: mysql
|
|
||||||
datasource:
|
|
||||||
mysql:
|
|
||||||
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:${nl.config.mysql.ip}}:${DB_PORT:${nl.config.mysql.port}}/${DB_NAME:${nl.config.mysql.database}}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
|
||||||
username: ${DB_USER:${nl.config.mysql.username}}
|
|
||||||
password: ${DB_PWD:${nl.config.mysql.password}}
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
oracle:
|
|
||||||
driver-class-name: oracle.jdbc.OracleDriver
|
|
||||||
url: jdbc:oracle:thin:@${nl.config.oracle.ip}:${nl.config.oracle.port}:${nl.config.oracle.scheme}
|
|
||||||
username: ${DB_USER:${nl.config.oracle.username}}
|
|
||||||
password: ${DB_PWD:${nl.config.oracle.password}}
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
sqlserver:
|
|
||||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
||||||
url: jdbc:sqlserver://${nl.config.sqlserver.ip}\${nl.config.sqlserver.port};DatabaseName=${nl.config.sqlserver.database}
|
|
||||||
username: ${DB_USER:${nl.config.sqlserver.username}}
|
|
||||||
password: ${DB_PWD:${nl.config.sqlserver.password}}
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
redis:
|
|
||||||
# 数据库索引
|
|
||||||
host: ${REDIS_HOST:${nl.config.redis.ip}}
|
|
||||||
port: ${REDIS_PORT:${nl.config.redis.port}}
|
|
||||||
password: ${REDIS_PWD:${nl.config.redis.password}}
|
|
||||||
redisson:
|
|
||||||
config: |
|
|
||||||
threads: 4
|
|
||||||
nettyThreads: 4
|
|
||||||
singleServerConfig:
|
|
||||||
database: 3
|
|
||||||
connectionMinimumIdleSize: 8
|
|
||||||
connectionPoolSize: 8
|
|
||||||
address: redis://127.0.0.1:6379
|
|
||||||
idleConnectionTimeout: 10000
|
|
||||||
timeout: 3000
|
|
||||||
jetcache:
|
|
||||||
statIntervalMinutes: 15
|
|
||||||
areaInCacheName: false
|
|
||||||
local:
|
|
||||||
default:
|
|
||||||
type: linkedhashmap
|
|
||||||
keyConvertor: fastjson
|
|
||||||
remote:
|
|
||||||
default:
|
|
||||||
type: redis
|
|
||||||
keyConvertor: fastjson2
|
|
||||||
broadcastChannel: projectA
|
|
||||||
valueEncoder: java
|
|
||||||
valueDecoder: java
|
|
||||||
poolConfig:
|
|
||||||
minIdle: 5
|
|
||||||
maxIdle: 20
|
|
||||||
maxTotal: 50
|
|
||||||
host: ${nl.config.redis.ip}
|
|
||||||
port: ${nl.config.redis.port}
|
|
||||||
#是否允许生成代码,生产环境设置为false
|
|
||||||
generator:
|
|
||||||
enabled: true
|
|
||||||
# IP 本地解析
|
|
||||||
ip:
|
|
||||||
local-parsing: true
|
|
||||||
|
|
||||||
# 文件存储路径
|
|
||||||
file:
|
|
||||||
mac:
|
|
||||||
path: ~/file/
|
|
||||||
avatar: ~/avatar/
|
|
||||||
linux:
|
|
||||||
path: /home/eladmin/file/
|
|
||||||
avatar: /home/eladmin/avatar/
|
|
||||||
windows:
|
|
||||||
path: C:\eladmin\file\
|
|
||||||
avatar: C:\eladmin\avatar\
|
|
||||||
# 文件大小 /M
|
|
||||||
maxSize: 100
|
|
||||||
avatarMaxSize: 5
|
|
||||||
logging:
|
|
||||||
file:
|
|
||||||
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
|
|
||||||
sso:
|
|
||||||
# Ticket有效期 (单位: 秒),默认五分钟
|
|
||||||
ticket-timeout: 300
|
|
||||||
# 所有允许的授权回调地址
|
|
||||||
allow-url: "*"
|
|
||||||
# 是否打开单点注销功能
|
|
||||||
is-slo: true
|
|
||||||
|
|
||||||
# ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
|
|
||||||
# 是否打开模式三
|
|
||||||
isHttp: true
|
|
||||||
# 接口调用秘钥(用于SSO模式三的单点注销功能)
|
|
||||||
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
|
|
||||||
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
|
||||||
is-read-cookie: true
|
|
||||||
is-print: false
|
|
||||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
|
||||||
token-session-check-login: false
|
|
||||||
alone-redis:
|
|
||||||
# Redis数据库索引(默认为0)
|
|
||||||
database: ${nl.config.redis.database}
|
|
||||||
# Redis服务器地址
|
|
||||||
host: ${nl.config.redis.ip}
|
|
||||||
# Redis服务器连接端口
|
|
||||||
port: ${nl.config.redis.port}
|
|
||||||
# Redis服务器连接密码(默认为空)
|
|
||||||
password:
|
|
||||||
# 连接超时时间
|
|
||||||
timeout: 10s
|
|
||||||
|
|
||||||
lucene:
|
|
||||||
index:
|
|
||||||
path: D:\lucene\index
|
|
||||||
|
|||||||
@@ -1,165 +1,30 @@
|
|||||||
server:
|
server:
|
||||||
port: 8010
|
port: 8011
|
||||||
#配置数据源
|
# 项目配置
|
||||||
spring:
|
nl:
|
||||||
autoconfigure:
|
config:
|
||||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
mysql:
|
||||||
datasource:
|
ip: 127.0.0.1
|
||||||
dynamic:
|
port: 3306
|
||||||
primary: mysql
|
username: root
|
||||||
datasource:
|
password: 12356
|
||||||
mysql:
|
database: nl-platform
|
||||||
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
redis:
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:10.93.41.198}:${DB_PORT:3306}/${DB_NAME:lz_lms_two}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
ip: 127.0.0.1
|
||||||
username: ${DB_USER:root}
|
port: 6379
|
||||||
password: ${DB_PWD:123456}
|
password: null
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rtmg_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
database: 1
|
||||||
# username: ${DB_USER:root}
|
oracle:
|
||||||
# password: ${DB_PWD:12356}
|
ip: 172.27.37.66
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
port: 1521
|
||||||
oracle:
|
scheme: RTMES
|
||||||
driver-class-name: oracle.jdbc.OracleDriver
|
username: LMSTELCOM
|
||||||
url: jdbc:oracle:thin:@172.27.37.66:1521:RTMES
|
password: LMSTELCOM_6463
|
||||||
username: ${DB_USER:LMSTELCOM}
|
sqlserver:
|
||||||
password: ${DB_PWD:LMSTELCOM_6463}
|
ip: 10.93.41.2
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
port: WINCC
|
||||||
sqlserver:
|
username: sa
|
||||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
password: 123
|
||||||
url: jdbc:sqlserver://10.93.41.2\WINCC;DatabaseName=马钢_RH
|
database: 马钢_RH
|
||||||
username: ${DB_USER:sa}
|
logging-path: C:\log\wms
|
||||||
password: ${DB_PWD:123}
|
dynamic-log-path: C:\log\lms
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
redis:
|
|
||||||
#数据库索引
|
|
||||||
host: ${REDIS_HOST:127.0.0.1}
|
|
||||||
port: ${REDIS_PORT:6379}
|
|
||||||
password: ${REDIS_PWD:}
|
|
||||||
redisson:
|
|
||||||
config: |
|
|
||||||
threads: 4
|
|
||||||
nettyThreads: 4
|
|
||||||
singleServerConfig:
|
|
||||||
database: 15
|
|
||||||
connectionMinimumIdleSize: 8
|
|
||||||
connectionPoolSize: 8
|
|
||||||
address: redis://127.0.0.1:6379
|
|
||||||
idleConnectionTimeout: 10000
|
|
||||||
timeout: 3000
|
|
||||||
# 登录相关配置
|
|
||||||
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=
|
|
||||||
# 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
|
|
||||||
token-validity-in-seconds: 7200000
|
|
||||||
# 在线用户key
|
|
||||||
online-key: online-token-
|
|
||||||
# 验证码
|
|
||||||
code-key: code-key-
|
|
||||||
# token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
|
|
||||||
detect: 1800000
|
|
||||||
# 续期时间范围,默认 1小时,这里单位毫秒
|
|
||||||
renew: 3600000
|
|
||||||
|
|
||||||
# IP 本地解析
|
|
||||||
ip:
|
|
||||||
local-parsing: true
|
|
||||||
|
|
||||||
#是否允许生成代码,生产环境设置为false
|
|
||||||
generator:
|
|
||||||
enabled: false
|
|
||||||
# 文件存储路径
|
|
||||||
file:
|
|
||||||
mac:
|
|
||||||
path: ~/file/
|
|
||||||
avatar: ~/avatar/
|
|
||||||
linux:
|
|
||||||
path: /home/eladmin/file/
|
|
||||||
avatar: /home/eladmin/avatar/
|
|
||||||
windows:
|
|
||||||
path: C:\eladmin\file\
|
|
||||||
avatar: C:\eladmin\avatar\
|
|
||||||
# 文件大小 /M
|
|
||||||
maxSize: 100
|
|
||||||
avatarMaxSize: 5
|
|
||||||
logging:
|
|
||||||
file:
|
|
||||||
path: /app/jar/logs
|
|
||||||
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
|
|
||||||
sso:
|
|
||||||
# Ticket有效期 (单位: 秒),默认五分钟
|
|
||||||
ticket-timeout: 300
|
|
||||||
# 所有允许的授权回调地址
|
|
||||||
allow-url: "*"
|
|
||||||
# 是否打开单点注销功能
|
|
||||||
is-slo: true
|
|
||||||
|
|
||||||
# ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
|
|
||||||
# 是否打开模式三
|
|
||||||
isHttp: true
|
|
||||||
# 接口调用秘钥(用于SSO模式三的单点注销功能)
|
|
||||||
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
|
|
||||||
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
|
||||||
is-read-cookie: true
|
|
||||||
is-print: false
|
|
||||||
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
|
||||||
token-session-check-login: false
|
|
||||||
alone-redis:
|
|
||||||
# Redis数据库索引(默认为0)
|
|
||||||
database: 9
|
|
||||||
# Redis服务器地址
|
|
||||||
host: 127.0.0.1
|
|
||||||
# Redis服务器连接端口
|
|
||||||
port: 6379
|
|
||||||
# Redis服务器连接密码(默认为空)
|
|
||||||
password:
|
|
||||||
# 连接超时时间
|
|
||||||
timeout: 10s
|
|
||||||
lucene:
|
|
||||||
index:
|
|
||||||
path: D:\lucene\index
|
|
||||||
|
|||||||
@@ -2,8 +2,14 @@ server:
|
|||||||
tomcat:
|
tomcat:
|
||||||
relaxed-query-chars: [ '|','{','}','[',']' ] #字符问题:https://blog.csdn.net/CanYue_Yi/article/details/109182577
|
relaxed-query-chars: [ '|','{','}','[',']' ] #字符问题:https://blog.csdn.net/CanYue_Yi/article/details/109182577
|
||||||
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118
|
||||||
|
lucene:
|
||||||
|
index:
|
||||||
|
path: D:\lucene\index
|
||||||
spring:
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
autoconfigure:
|
||||||
|
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
messages:
|
messages:
|
||||||
basename: language/login/login,language/error/error,language/buss/buss,language/task/task
|
basename: language/login/login,language/error/error,language/buss/buss,language/task/task
|
||||||
datasource:
|
datasource:
|
||||||
@@ -46,23 +52,71 @@ spring:
|
|||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
login-username: admin
|
login-username: admin
|
||||||
login-password: admin
|
login-password: admin
|
||||||
|
dynamic:
|
||||||
|
primary: mysql
|
||||||
|
datasource:
|
||||||
|
mysql:
|
||||||
|
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
|
url: jdbc:log4jdbc:mysql://${DB_HOST:${nl.config.mysql.ip}}:${DB_PORT:${nl.config.mysql.port}}/${DB_NAME:${nl.config.mysql.database}}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
|
username: ${DB_USER:${nl.config.mysql.username}}
|
||||||
|
password: ${DB_PWD:${nl.config.mysql.password}}
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
oracle:
|
||||||
|
driver-class-name: oracle.jdbc.OracleDriver
|
||||||
|
url: jdbc:oracle:thin:@${nl.config.oracle.ip}:${nl.config.oracle.port}:${nl.config.oracle.scheme}
|
||||||
|
username: ${DB_USER:${nl.config.oracle.username}}
|
||||||
|
password: ${DB_PWD:${nl.config.oracle.password}}
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
sqlserver:
|
||||||
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
url: jdbc:sqlserver://${nl.config.sqlserver.ip}\${nl.config.sqlserver.port};DatabaseName=${nl.config.sqlserver.database}
|
||||||
|
username: ${DB_USER:${nl.config.sqlserver.username}}
|
||||||
|
password: ${DB_PWD:${nl.config.sqlserver.password}}
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
flyway:
|
||||||
|
#开启
|
||||||
|
enabled: true
|
||||||
|
#当迁移时发现目标schema非空,而且带有没有元数据的表时,是否自动执行基准迁移,默认false.
|
||||||
|
baseline-on-migrate: true
|
||||||
|
# 检测迁移脚本的路径是否存在,如不存在,则抛出异常
|
||||||
|
check-location: true
|
||||||
|
#sql脚本位置
|
||||||
|
locations: classpath:db/migration
|
||||||
|
#是否允许无序的迁移,默认false
|
||||||
|
out-of-order: false
|
||||||
|
#编码
|
||||||
|
encoding: UTF-8
|
||||||
freemarker:
|
freemarker:
|
||||||
check-template-location: false
|
check-template-location: false
|
||||||
profiles:
|
|
||||||
active: dev
|
|
||||||
jackson:
|
jackson:
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
repositories:
|
repositories:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
redis:
|
||||||
|
# 数据库索引
|
||||||
|
host: ${REDIS_HOST:${nl.config.redis.ip}}
|
||||||
|
port: ${REDIS_PORT:${nl.config.redis.port}}
|
||||||
|
password: ${REDIS_PWD:${nl.config.redis.password}}
|
||||||
|
redisson:
|
||||||
|
config: |
|
||||||
|
threads: 4
|
||||||
|
nettyThreads: 4
|
||||||
|
singleServerConfig:
|
||||||
|
database: 3
|
||||||
|
connectionMinimumIdleSize: 8
|
||||||
|
connectionPoolSize: 8
|
||||||
|
address: redis://127.0.0.1:6379
|
||||||
|
idleConnectionTimeout: 10000
|
||||||
|
timeout: 3000
|
||||||
dynamic:
|
dynamic:
|
||||||
tp:
|
tp:
|
||||||
enabled: true # 是否启用 dynamictp,默认true
|
enabled: true # 是否启用 dynamictp,默认true
|
||||||
enabledBanner: false # 是否启用 控制台banner,默认true
|
enabledBanner: false # 是否启用 控制台banner,默认true
|
||||||
enabledCollect: true # 是否开启监控指标采集,默认true
|
enabledCollect: true # 是否开启监控指标采集,默认true
|
||||||
collectorTypes: logging,test_collect # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
collectorTypes: logging,test_collect # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
||||||
logPath: C:\log\lms # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
logPath: ${nl.config.dynamic-log-path} # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
||||||
monitorInterval: 8
|
monitorInterval: 8
|
||||||
tomcatTp: # tomcat webserver 线程池配置
|
tomcatTp: # tomcat webserver 线程池配置
|
||||||
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
||||||
@@ -116,9 +170,29 @@ login:
|
|||||||
#密码加密传输,前端公钥加密,后端私钥解密
|
#密码加密传输,前端公钥加密,后端私钥解密
|
||||||
rsa:
|
rsa:
|
||||||
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
||||||
|
#是否允许生成代码,生产环境设置为false
|
||||||
|
generator:
|
||||||
|
enabled: true
|
||||||
|
# IP 本地解析
|
||||||
|
ip:
|
||||||
|
local-parsing: true
|
||||||
|
# 文件存储路径
|
||||||
|
file:
|
||||||
|
mac:
|
||||||
|
path: ~/file/
|
||||||
|
avatar: ~/avatar/
|
||||||
|
linux:
|
||||||
|
path: /home/eladmin/file/
|
||||||
|
avatar: /home/eladmin/avatar/
|
||||||
|
windows:
|
||||||
|
path: C:\eladmin\file\
|
||||||
|
avatar: C:\eladmin\avatar\
|
||||||
|
# 文件大小 /M
|
||||||
|
maxSize: 100
|
||||||
|
avatarMaxSize: 5
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
path: C:\log\wms
|
path: ${nl.config.logging-path}
|
||||||
config: classpath:logback-spring.xml
|
config: classpath:logback-spring.xml
|
||||||
# sa-token白名单配置
|
# sa-token白名单配置
|
||||||
security:
|
security:
|
||||||
@@ -162,9 +236,7 @@ mybatis-plus:
|
|||||||
db-config:
|
db-config:
|
||||||
id-type: INPUT
|
id-type: INPUT
|
||||||
banner: false
|
banner: false
|
||||||
lucene:
|
# Sa-Token配置
|
||||||
index:
|
|
||||||
path: D:\lucene\index
|
|
||||||
sa-token:
|
sa-token:
|
||||||
# token 名称 (同时也是cookie名称)
|
# token 名称 (同时也是cookie名称)
|
||||||
token-name: Authorization
|
token-name: Authorization
|
||||||
@@ -182,9 +254,53 @@ sa-token:
|
|||||||
is-log: false
|
is-log: false
|
||||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||||
# token 前缀
|
# token 前缀
|
||||||
token-prefix:
|
token-prefix: Bearer
|
||||||
cookie:
|
sso:
|
||||||
# 配置 Cookie 作用域:根据二级域名实现sso登入如lms.sso.com;acs.sso.com
|
# Ticket有效期 (单位: 秒),默认五分钟
|
||||||
domain:
|
ticket-timeout: 300
|
||||||
is-read-cookie: false
|
# 所有允许的授权回调地址
|
||||||
|
allow-url: "*"
|
||||||
|
# 是否打开单点注销功能
|
||||||
|
is-slo: true
|
||||||
|
|
||||||
|
# ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
|
||||||
|
# 是否打开模式三
|
||||||
|
isHttp: true
|
||||||
|
# 接口调用秘钥(用于SSO模式三的单点注销功能)
|
||||||
|
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
|
||||||
|
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
||||||
|
is-read-cookie: true
|
||||||
is-print: false
|
is-print: false
|
||||||
|
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
||||||
|
token-session-check-login: false
|
||||||
|
alone-redis:
|
||||||
|
# Redis数据库索引(默认为0)
|
||||||
|
database: ${nl.config.redis.database}
|
||||||
|
# Redis服务器地址
|
||||||
|
host: ${nl.config.redis.ip}
|
||||||
|
# Redis服务器连接端口
|
||||||
|
port: ${nl.config.redis.port}
|
||||||
|
# Redis服务器连接密码(默认为空)
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
jetcache:
|
||||||
|
statIntervalMinutes: 15
|
||||||
|
areaInCacheName: false
|
||||||
|
local:
|
||||||
|
default:
|
||||||
|
type: linkedhashmap
|
||||||
|
keyConvertor: fastjson
|
||||||
|
remote:
|
||||||
|
default:
|
||||||
|
type: redis
|
||||||
|
keyConvertor: fastjson2
|
||||||
|
broadcastChannel: projectA
|
||||||
|
valueEncoder: java
|
||||||
|
valueDecoder: java
|
||||||
|
poolConfig:
|
||||||
|
minIdle: 5
|
||||||
|
maxIdle: 20
|
||||||
|
maxTotal: 50
|
||||||
|
host: ${nl.config.redis.ip}
|
||||||
|
port: ${nl.config.redis.port}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Navicat Premium Data Transfer
|
||||||
|
|
||||||
|
Source Server : mysql
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 80030
|
||||||
|
Source Host : localhost:3306
|
||||||
|
Source Schema : storm-dev
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 80030
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 06/06/2024 17:11:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for system_tenant
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `system_tenant`;
|
||||||
|
CREATE TABLE `system_tenant` (
|
||||||
|
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '租户编号',
|
||||||
|
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户名',
|
||||||
|
`contact_user_id` bigint(0) NULL DEFAULT NULL COMMENT '联系人的用户编号',
|
||||||
|
`contact_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '联系人',
|
||||||
|
`contact_mobile` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '联系手机',
|
||||||
|
`status` tinyint(0) NOT NULL DEFAULT 0 COMMENT '租户状态(0正常 1停用)',
|
||||||
|
`website` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '绑定域名',
|
||||||
|
`package_id` bigint(0) NOT NULL COMMENT '租户套餐编号',
|
||||||
|
`expire_time` datetime(0) NOT NULL COMMENT '过期时间',
|
||||||
|
`account_count` int(0) NOT NULL COMMENT '账号数量',
|
||||||
|
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '创建者',
|
||||||
|
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
|
||||||
|
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
|
||||||
|
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 162 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '租户表' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
Reference in New Issue
Block a user