添加日志 文档开关

This commit is contained in:
sgjj 2020-01-03 18:21:00 +08:00
parent 834cb473f5
commit 30ef12ada0
2 changed files with 31 additions and 26 deletions

View File

@ -1,5 +1,6 @@
package net.mingsoft.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@ -13,6 +14,7 @@ import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@ConditionalOnProperty(prefix="ms",name = "swagger.enable", havingValue = "true")
public class SwaggerConfig {
@Bean

View File

@ -4,27 +4,30 @@ server:
servlet.session.timeout: 60M
logging:
level:
net.mingsoft: trace
file: mcms.log
level:
net.mingsoft: trace
file: mcms.log #日志文件存放位置
path: log #日志压缩文件存放位置
ms:
manager:
path: /ms
view-path: /WEB-INF/manager
swagger:
enable: true #启用swagger文档
manager:
path: /ms
view-path: /WEB-INF/manager
upload:
path: upload
mapping: /upload/**
denied: .exe,.jsp
multipart:
#最大上传文件大小 单位KB
max-file-size: 10240
#文件暂存临时目录
upload-temp-dir: temp
#临时文件大小
max-in-memory-size: 10240
#总上传最大大小 单位KB -1禁用
max-request-size: -1
upload:
path: upload
mapping: /upload/**
denied: .exe,.jsp
multipart:
#最大上传文件大小 单位KB
max-file-size: 10240
#文件暂存临时目录
upload-temp-dir: temp
#临时文件大小
max-in-memory-size: 10240
#总上传最大大小 单位KB -1禁用
max-request-size: -1
@ -33,7 +36,7 @@ spring:
active: dev
mvc:
pathmatch:
use-suffix-pattern: true
use-suffix-pattern: true
devtools:
restart:
enabled: true
@ -65,4 +68,4 @@ spring:
mybatis:
configuration:
database-id: mysql
database-id: mysql