增加access-logging日志模块的配置文件;

修改openapi默认的的本地/线上测试host;

增加MapperScan
master
李一帆 2024-01-23 15:35:30 +08:00
parent 80637b0db7
commit 81d3afa8cc
3 changed files with 35 additions and 2 deletions

View File

@ -7,7 +7,11 @@ import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
/** /**
* *
@ -19,7 +23,11 @@ import org.springframework.context.annotation.ComponentScan;
@OpenAPIDefinition( @OpenAPIDefinition(
servers = { servers = {
@Server( @Server(
url = "http://local.gunshiiot.com:8080/gunshiApp/xyt", url = "http://localhost:24101/gunshiApp/xyt",
description = "本地测试环境"
),
@Server(
url = "http://local.gunshiiot.com:24101/gunshiApp/xyt",
description = "线上测试环境" description = "线上测试环境"
) )
} }

View File

@ -1,4 +1,4 @@
package com.gunshi.project.xyt.onfig; package com.gunshi.project.xyt.config;
import org.springdoc.core.models.GroupedOpenApi; import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -1,3 +1,8 @@
server:
port: 24101
servlet:
context-path: /gunshiApp/xyt
spring: spring:
datasource: datasource:
dynamic: dynamic:
@ -30,4 +35,24 @@ gunshi:
publicBucket: test.by-lyf.tmp publicBucket: test.by-lyf.tmp
loginBucket: test.by-lyf.tmp loginBucket: test.by-lyf.tmp
privateBucket: test.by-lyf.tmp privateBucket: test.by-lyf.tmp
access:
logging:
enabled: true
login:
enabled: true
maxHistory: 200
operation:
enabled: true
maxHistory: 200
collection: operationLogging
exception:
enabled: true
maxHistory: 200
collection: exceptionLogging
mongo:
enabled: true
uri: mongodb://10.0.41.112:27017
database: gunshi-logging
username: gunshi_logger
password: 1234567a