添加日志 文档开关
This commit is contained in:
parent
834cb473f5
commit
30ef12ada0
|
@ -1,5 +1,6 @@
|
||||||
package net.mingsoft.config;
|
package net.mingsoft.config;
|
||||||
|
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
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;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@ConditionalOnProperty(prefix="ms",name = "swagger.enable", havingValue = "true")
|
||||||
public class SwaggerConfig {
|
public class SwaggerConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -4,27 +4,30 @@ server:
|
||||||
servlet.session.timeout: 60M
|
servlet.session.timeout: 60M
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
net.mingsoft: trace
|
net.mingsoft: trace
|
||||||
file: mcms.log
|
file: mcms.log #日志文件存放位置
|
||||||
|
path: log #日志压缩文件存放位置
|
||||||
ms:
|
ms:
|
||||||
manager:
|
swagger:
|
||||||
path: /ms
|
enable: true #启用swagger文档
|
||||||
view-path: /WEB-INF/manager
|
manager:
|
||||||
|
path: /ms
|
||||||
|
view-path: /WEB-INF/manager
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
path: upload
|
path: upload
|
||||||
mapping: /upload/**
|
mapping: /upload/**
|
||||||
denied: .exe,.jsp
|
denied: .exe,.jsp
|
||||||
multipart:
|
multipart:
|
||||||
#最大上传文件大小 单位:KB
|
#最大上传文件大小 单位:KB
|
||||||
max-file-size: 10240
|
max-file-size: 10240
|
||||||
#文件暂存临时目录
|
#文件暂存临时目录
|
||||||
upload-temp-dir: temp
|
upload-temp-dir: temp
|
||||||
#临时文件大小
|
#临时文件大小
|
||||||
max-in-memory-size: 10240
|
max-in-memory-size: 10240
|
||||||
#总上传最大大小 单位:KB -1禁用
|
#总上传最大大小 单位:KB -1禁用
|
||||||
max-request-size: -1
|
max-request-size: -1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +36,7 @@ spring:
|
||||||
active: dev
|
active: dev
|
||||||
mvc:
|
mvc:
|
||||||
pathmatch:
|
pathmatch:
|
||||||
use-suffix-pattern: true
|
use-suffix-pattern: true
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -65,4 +68,4 @@ spring:
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
database-id: mysql
|
database-id: mysql
|
Loading…
Reference in New Issue