build(biji-houdaun): 优化配置文件和依赖管理- 移除生产环境中的 MyBatis-Plus 配置- 在开发环境中添加 MyBatis-Plus 配置
- 在生产环境中禁用 Knife4j- 更新 Knife4j 和 springdoc 依赖为可选 -调整开发和生产环境的依赖范围
This commit is contained in:
@@ -3,12 +3,14 @@ package com.test.bijihoudaun.config;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.info.Info;
|
||||
import org.springdoc.core.models.GroupedOpenApi;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
|
||||
@Configuration
|
||||
@Profile("!prod") // 只在非生产环境激活
|
||||
@ConditionalOnProperty(name = "knife4j.enable", havingValue = "true", matchIfMissing = true)
|
||||
public class Knife4jConfig {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -11,3 +11,15 @@ spring:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
dialect: org.hibernate.dialect.SQLiteDialect
|
||||
|
||||
|
||||
# MyBatis-Plus??
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: isDeleted # 全局逻辑删除的实体字段名
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
@@ -9,4 +9,10 @@ spring:
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: false
|
||||
dialect: org.hibernate.dialect.SQLiteDialect
|
||||
dialect: org.hibernate.dialect.SQLiteDialect
|
||||
|
||||
|
||||
|
||||
# 禁用Knife4j
|
||||
knife4j:
|
||||
enable: false
|
||||
@@ -24,16 +24,7 @@ worker:
|
||||
datacenter:
|
||||
id: 1
|
||||
|
||||
# MyBatis-Plus??
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: isDeleted # 全局逻辑删除的实体字段名
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
|
||||
|
||||
# JWT 配置
|
||||
jwt:
|
||||
|
||||
Reference in New Issue
Block a user