添加日志 文档开关
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
|
||||||
|
|
|
@ -2,29 +2,32 @@ server:
|
||||||
port: 8080
|
port: 8080
|
||||||
servlet.context-path: /ms-mcms
|
servlet.context-path: /ms-mcms
|
||||||
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
|
||||||
upload:
|
view-path: /WEB-INF/manager
|
||||||
path: upload
|
|
||||||
mapping: /upload/**
|
upload:
|
||||||
denied: .exe,.jsp
|
path: upload
|
||||||
multipart:
|
mapping: /upload/**
|
||||||
#最大上传文件大小 单位:KB
|
denied: .exe,.jsp
|
||||||
max-file-size: 10240
|
multipart:
|
||||||
#文件暂存临时目录
|
#最大上传文件大小 单位:KB
|
||||||
upload-temp-dir: temp
|
max-file-size: 10240
|
||||||
#临时文件大小
|
#文件暂存临时目录
|
||||||
max-in-memory-size: 10240
|
upload-temp-dir: temp
|
||||||
#总上传最大大小 单位:KB -1禁用
|
#临时文件大小
|
||||||
max-request-size: -1
|
max-in-memory-size: 10240
|
||||||
|
#总上传最大大小 单位:KB -1禁用
|
||||||
|
max-request-size: -1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,8 +35,8 @@ spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: dev
|
||||||
mvc:
|
mvc:
|
||||||
pathmatch:
|
pathmatch:
|
||||||
use-suffix-pattern: true
|
use-suffix-pattern: true
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -54,7 +57,7 @@ spring:
|
||||||
expose-spring-macro-helpers: true
|
expose-spring-macro-helpers: true
|
||||||
prefer-file-system-access: false
|
prefer-file-system-access: false
|
||||||
template-loader-path: classpath:/WEB-INF/manager,classpath:/WEB-INF
|
template-loader-path: classpath:/WEB-INF/manager,classpath:/WEB-INF
|
||||||
settings:
|
settings:
|
||||||
template_update_delay: 1
|
template_update_delay: 1
|
||||||
default_encoding: UTF-8
|
default_encoding: UTF-8
|
||||||
classic_compatible: true
|
classic_compatible: true
|
||||||
|
@ -62,7 +65,7 @@ spring:
|
||||||
time_format: HH:mm:ss
|
time_format: HH:mm:ss
|
||||||
datetime_format: yyyy-MM-dd HH:mm:ss
|
datetime_format: yyyy-MM-dd HH:mm:ss
|
||||||
number_format: 0.##
|
number_format: 0.##
|
||||||
|
|
||||||
mybatis:
|
mybatis:
|
||||||
configuration:
|
configuration:
|
||||||
database-id: mysql
|
database-id: mysql
|
Loading…
Reference in New Issue