资源中心初始工程
commit
9bb1937982
@ -0,0 +1,58 @@
|
||||
# ignore these folders
|
||||
target/
|
||||
.idea/
|
||||
.settings/
|
||||
.vscode/
|
||||
bin/
|
||||
out/
|
||||
|
||||
# ignore these files
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.idea
|
||||
|
||||
# filter databfile、sln file
|
||||
*.mdb
|
||||
*.ldb
|
||||
*.sln
|
||||
|
||||
# class file
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.so
|
||||
|
||||
# compression file
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
*.via
|
||||
*.tmp
|
||||
*.err
|
||||
*.log
|
||||
*.iml
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
Icon?
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
.factorypath
|
||||
.mvn/
|
||||
mvnw.cmd
|
||||
mvnw
|
||||
|
||||
# Files or folders need to be retained
|
||||
# ...
|
@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.12</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<groupId>org.sztzjy</groupId>
|
||||
<artifactId>resource_center</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>resource_center</name>
|
||||
<description>resource_center</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<jjwt.version>0.10.8</jjwt.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.15-beta2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.15-beta2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itextpdf</artifactId>
|
||||
<version>5.5.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext-asian</artifactId>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
<version>2.7.12</version>
|
||||
</dependency>
|
||||
<!-- 分页插件-->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--逆向工程-->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.generator</groupId>
|
||||
<artifactId>mybatis-generator-core</artifactId>
|
||||
<version>1.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-jwt</artifactId>
|
||||
<version>1.1.1.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- 其他依赖项 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<!-- 其他依赖项 -->
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>9.26</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.2.18</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security.oauth</groupId>
|
||||
<artifactId>spring-security-oauth2</artifactId>
|
||||
<version>2.3.8.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-spatial</artifactId>
|
||||
<version>5.4.29.Final</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>mysql</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- MySQL连接驱动 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.32</version>
|
||||
</dependency>
|
||||
<!-- 添加jwt依赖 -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-api</artifactId>
|
||||
<version>${jjwt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-impl</artifactId>
|
||||
<version>${jjwt.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-jackson</artifactId>
|
||||
<version>${jjwt.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.47</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
<version>2.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>5.3.14</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.python</groupId>
|
||||
<artifactId>jython-standalone</artifactId>
|
||||
<version>2.7.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xhtmlrenderer</groupId>
|
||||
<artifactId>flying-saucer-pdf</artifactId>
|
||||
<version>9.1.22</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xhtmlrenderer</groupId>
|
||||
<artifactId>flying-saucer-pdf-itext5</artifactId>
|
||||
<version>9.1.22</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>2.6.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>false</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,15 @@
|
||||
package com.sztzjy.resource_center;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
public class ResourceCenterApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ResourceCenterApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,176 @@
|
||||
package com.sztzjy.resource_center.util.file;
|
||||
|
||||
import cn.hutool.core.util.CharsetUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class LocalFileUtil implements IFileUtil{
|
||||
|
||||
private final static List<String> excludeSp = Arrays.asList("exe", "bin", "sh");
|
||||
|
||||
private final String localPath;
|
||||
|
||||
public LocalFileUtil(String localPath) {
|
||||
this.localPath = localPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upload(MultipartFile file) {
|
||||
return upload(null, file);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String upload(String objectName, InputStream fileIn) {
|
||||
Assert.notNull(fileIn, "文件不能为空");
|
||||
Assert.hasText(objectName, "文件名为空");
|
||||
Assert.isTrue(objectName.lastIndexOf(".") > 0, "文件名称需携带扩展后缀");
|
||||
FileOutputStream out = null;
|
||||
try {
|
||||
String relativePath = getDiskRelativePath(objectName, null);
|
||||
File file = new File(getFullPath(relativePath));
|
||||
file.getParentFile().mkdirs();
|
||||
out = new FileOutputStream(file);
|
||||
byte[] buff = new byte[4096];
|
||||
int len;
|
||||
while ((len = fileIn.read(buff)) != -1) {
|
||||
out.write(buff, 0, len);
|
||||
}
|
||||
out.flush();
|
||||
return relativePath;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new IllegalArgumentException("上传文件失败,IO错误");
|
||||
} finally {
|
||||
try {
|
||||
fileIn.close();
|
||||
if (out != null) out.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(String path) {
|
||||
if (!StringUtils.hasText(path)) return false;
|
||||
File file = new File(getFullPath(path));
|
||||
if (!file.exists()) return false;
|
||||
return file.delete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(HttpServletResponse response, String fileName, String relativePath) {
|
||||
Assert.hasText(relativePath, "路径为空");
|
||||
System.out.println("------------------------------------" + getFullPath(relativePath));
|
||||
File file = new File(getFullPath(relativePath));
|
||||
Assert.isTrue(file.exists(), "附件不存在");
|
||||
String sp = relativePath.substring(relativePath.lastIndexOf(".") + 1);
|
||||
Assert.isTrue(!excludeSp.contains(sp.toLowerCase()), "文件类型错误");
|
||||
if (!StringUtils.hasText(fileName)) {
|
||||
fileName = file.getName().substring(0, file.getName().lastIndexOf("."));
|
||||
}
|
||||
InputStream fis = null;
|
||||
try {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode((fileName + "." + sp), CharsetUtil.UTF_8));
|
||||
fis = new BufferedInputStream(Files.newInputStream(file.toPath()));
|
||||
response.addHeader("Content-Length", String.valueOf(fis.available()));
|
||||
byte[] buff = new byte[4096];
|
||||
int len;
|
||||
while ((len = fis.read(buff)) != -1) {
|
||||
response.getOutputStream().write(buff, 0, len);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("下载文件失败: " + e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(HttpServletResponse response, String relativePath) {
|
||||
download(response, null, relativePath);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFullPath(String relativePath) {
|
||||
if (!relativePath.startsWith("/")) {
|
||||
relativePath = "/" + relativePath;
|
||||
}
|
||||
return localPath + relativePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSuffix(String fileName) {
|
||||
Assert.hasText(fileName, "文件名不存在!");
|
||||
if (fileName.lastIndexOf(".") < 0) {
|
||||
return null;
|
||||
}
|
||||
return fileName.substring(fileName.lastIndexOf(".") + 1);
|
||||
}
|
||||
|
||||
public String upload(String fileName, MultipartFile file) {
|
||||
return upload(fileName, file, null);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDiskRelativePath(String fileName, String suffix) {
|
||||
Calendar c = Calendar.getInstance();
|
||||
Date d = new Date();
|
||||
c.setTime(d);
|
||||
String year = Integer.toString(c.get(Calendar.YEAR));
|
||||
String month = Integer.toString(c.get(Calendar.MONTH) + 1);
|
||||
String day = Integer.toString(c.get(Calendar.DATE));
|
||||
StringBuilder path = new StringBuilder();
|
||||
path.append("/").append(year)
|
||||
.append("/").append(month)
|
||||
.append("/").append(day)
|
||||
.append("/").append(fileName);
|
||||
if (StringUtils.hasText(suffix)) path.append(".").append(suffix);
|
||||
return path.toString();
|
||||
}
|
||||
|
||||
|
||||
private String upload(String fileName, MultipartFile file, String relativePath) {
|
||||
Assert.isTrue(!file.isEmpty(), "文件不存在");
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
if (fileName == null) fileName = IdUtil.simpleUUID();
|
||||
String sp = getSuffix(originalFilename);
|
||||
Assert.notNull(sp, "文件类型错误");
|
||||
Assert.isTrue(!excludeSp.contains(sp.toLowerCase()), "文件类型错误");
|
||||
try {
|
||||
String filePath;
|
||||
if (relativePath == null) {
|
||||
filePath = getDiskRelativePath(fileName, sp);
|
||||
} else {
|
||||
relativePath = relativePath.endsWith("/") ? relativePath : relativePath + "/";
|
||||
filePath = relativePath + fileName + "." + sp;
|
||||
}
|
||||
|
||||
File destFile = new File(getFullPath(filePath));
|
||||
destFile.getParentFile().mkdirs();
|
||||
file.transferTo(destFile);
|
||||
return filePath;
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new IllegalArgumentException("上传文件失败,FileNotFound错误");
|
||||
} catch (IOException e) {
|
||||
throw new IllegalArgumentException("上传文件失败,IO错误");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
db-type: mysql
|
||||
url: jdbc:mysql://${DB_HOST:118.31.7.2}:${DB_PORT:3306}/${DB_NAME:resource_center}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:sztzjy2017}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
|
||||
# 文件存储
|
||||
file:
|
||||
type: local
|
||||
# path: /usr/local/tianzeProject/financial_bigdata/uploadFile
|
||||
path: D:/home
|
||||
timer:
|
||||
enable: false
|
||||
|
||||
swagger:
|
||||
enable: true
|
||||
tokenHeader: Authorization
|
||||
title: 天择外汇模拟交易 • 接口文档
|
||||
description: 天择外汇模拟交易WebAPI接口文档
|
||||
contactName: 深圳天择教育科技有限公司
|
||||
contactAddress: www.sztzjy.com
|
||||
version: @project.version@
|
@ -0,0 +1,28 @@
|
||||
#天金融大数据
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
db-type: mysql
|
||||
url: jdbc:mysql://${DB_HOST:120.78.220.29}:${DB_PORT:3307}/${DB_NAME:financial_bigdata}?useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:sztzjy2017}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
|
||||
# 文件存储
|
||||
file:
|
||||
type: local
|
||||
path: /usr/local/tianzeProject/financial_bigdata/uploadFile
|
||||
|
||||
|
||||
timer:
|
||||
enable: false
|
||||
|
||||
swagger:
|
||||
enable: true
|
||||
tokenHeader: Authorization
|
||||
title: 天择外汇模拟交易 • 接口文档
|
||||
description: 天择外汇模拟交易WebAPI接口文档
|
||||
contactName: 深圳天择教育科技有限公司
|
||||
contactAddress: www.sztzjy.com
|
||||
version: @project.version@
|
@ -0,0 +1,85 @@
|
||||
server:
|
||||
port: 8889
|
||||
servlet:
|
||||
context-path: /
|
||||
tomcat:
|
||||
relaxedQueryChars: <,>, [,],^,`,{,|,}
|
||||
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 50MB
|
||||
max-request-size: 50MB
|
||||
application:
|
||||
name: trading_system
|
||||
profiles:
|
||||
active: dev
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
database: 0
|
||||
# spring.redis.pool.max-active=8
|
||||
# # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
# spring.redis.pool.max-wait=-1
|
||||
# # 连接池中的最大空闲连接
|
||||
# spring.redis.pool.max-idle=8
|
||||
# # 连接池中的最小空闲连接
|
||||
# spring.redis.pool.min-idle=0
|
||||
# # 连接超时时间(毫秒)
|
||||
# spring.redis.timeout=0
|
||||
datasource:
|
||||
druid:
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
min-idle: 15
|
||||
# 最大连接数
|
||||
max-active: 500
|
||||
# 获取连接超时时间
|
||||
max-wait: 5000
|
||||
# 连接有效性检测时间
|
||||
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: false
|
||||
# 是否在归还到池中前进行检验
|
||||
test-on-return: false
|
||||
# 检测连接是否有效
|
||||
validation-query: select 'X'
|
||||
# 配置监控统计
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
stat-view-servlet:
|
||||
allow:
|
||||
enabled: true
|
||||
# 控制台管理用户名和密码
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
login-username: admin
|
||||
login-password: 2023
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 记录慢SQL
|
||||
log-slow-sql: false
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
mybatis:
|
||||
type-aliases-package: com.sztzjy.financial_bigdata.entity
|
||||
mapper-locations: classpath*:/mapper/*.xml
|
||||
|
||||
|
Loading…
Reference in New Issue