添加日志 文档开关

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

@ -2,29 +2,32 @@ server:
port: 8080
servlet.context-path: /ms-mcms
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
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
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
@ -32,8 +35,8 @@ spring:
profiles:
active: dev
mvc:
pathmatch:
use-suffix-pattern: true
pathmatch:
use-suffix-pattern: true
devtools:
restart:
enabled: true
@ -54,7 +57,7 @@ spring:
expose-spring-macro-helpers: true
prefer-file-system-access: false
template-loader-path: classpath:/WEB-INF/manager,classpath:/WEB-INF
settings:
settings:
template_update_delay: 1
default_encoding: UTF-8
classic_compatible: true
@ -62,7 +65,7 @@ spring:
time_format: HH:mm:ss
datetime_format: yyyy-MM-dd HH:mm:ss
number_format: 0.##
mybatis:
configuration:
database-id: mysql
database-id: mysql