Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/yudao-cloud
						commit
						1da56a0b44
					
				| 
						 | 
				
			
			@ -19,11 +19,6 @@
 | 
			
		|||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
        <!-- Spring Cloud 基础 -->
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.cloud</groupId>
 | 
			
		||||
            <artifactId>spring-cloud-starter-bootstrap</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>cn.iocoder.cloud</groupId>
 | 
			
		||||
            <artifactId>yudao-spring-boot-starter-env</artifactId>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,20 @@
 | 
			
		|||
--- #################### 注册中心 + 配置中心相关配置 ####################
 | 
			
		||||
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    nacos:
 | 
			
		||||
      server-addr: 127.0.0.1:8848 # Nacos 服务器地址
 | 
			
		||||
      username: # Nacos 账号
 | 
			
		||||
      password: # Nacos 密码
 | 
			
		||||
      discovery: # 【配置中心】配置项
 | 
			
		||||
        namespace: dev # 命名空间。这里使用 dev 开发环境
 | 
			
		||||
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 | 
			
		||||
        metadata:
 | 
			
		||||
          version: 1.0.0 # 服务实例的版本号,可用于灰度发布
 | 
			
		||||
      config: # 【注册中心】配置项
 | 
			
		||||
        namespace: dev # 命名空间。这里使用 dev 开发环境
 | 
			
		||||
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 | 
			
		||||
 | 
			
		||||
--- #################### 数据库相关配置 ####################
 | 
			
		||||
spring:
 | 
			
		||||
  # 数据源配置项
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,20 @@
 | 
			
		|||
--- #################### 注册中心 + 配置中心相关配置 ####################
 | 
			
		||||
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    nacos:
 | 
			
		||||
      server-addr: 127.0.0.1:8848 # Nacos 服务器地址
 | 
			
		||||
      username: # Nacos 账号
 | 
			
		||||
      password: # Nacos 密码
 | 
			
		||||
      discovery: # 【配置中心】配置项
 | 
			
		||||
        namespace: dev # 命名空间。这里使用 dev 开发环境
 | 
			
		||||
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 | 
			
		||||
        metadata:
 | 
			
		||||
          version: 1.0.0 # 服务实例的版本号,可用于灰度发布
 | 
			
		||||
      config: # 【注册中心】配置项
 | 
			
		||||
        namespace: dev # 命名空间。这里使用 dev 开发环境
 | 
			
		||||
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 | 
			
		||||
 | 
			
		||||
--- #################### 数据库相关配置 ####################
 | 
			
		||||
spring:
 | 
			
		||||
  # 数据源配置项
 | 
			
		||||
| 
						 | 
				
			
			@ -105,9 +122,8 @@ spring:
 | 
			
		|||
logging:
 | 
			
		||||
  level:
 | 
			
		||||
    # 配置自己写的 MyBatis Mapper 打印日志
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql: debug
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
 | 
			
		||||
    cn.iocoder.yudao.module.member.dal.mysql: debug
 | 
			
		||||
    org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
 | 
			
		||||
 | 
			
		||||
--- #################### 芋道相关配置 ####################
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,8 +1,19 @@
 | 
			
		|||
spring:
 | 
			
		||||
  application:
 | 
			
		||||
    name: member-server
 | 
			
		||||
 | 
			
		||||
  profiles:
 | 
			
		||||
    active: local
 | 
			
		||||
 | 
			
		||||
  main:
 | 
			
		||||
    allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
 | 
			
		||||
    allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
 | 
			
		||||
 | 
			
		||||
  config:
 | 
			
		||||
    import:
 | 
			
		||||
      - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
 | 
			
		||||
      - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
 | 
			
		||||
 | 
			
		||||
  # Servlet 配置
 | 
			
		||||
  servlet:
 | 
			
		||||
    # 文件上传相关配置项
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +35,13 @@ spring:
 | 
			
		|||
    redis:
 | 
			
		||||
      time-to-live: 1h # 设置过期时间为 1 小时
 | 
			
		||||
 | 
			
		||||
server:
 | 
			
		||||
  port: 48087
 | 
			
		||||
 | 
			
		||||
logging:
 | 
			
		||||
  file:
 | 
			
		||||
    name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
 | 
			
		||||
 | 
			
		||||
--- #################### 接口文档配置 ####################
 | 
			
		||||
 | 
			
		||||
springdoc:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,23 +0,0 @@
 | 
			
		|||
--- #################### 注册中心相关配置 ####################
 | 
			
		||||
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    nacos:
 | 
			
		||||
      server-addr: 127.0.0.1:8848
 | 
			
		||||
      discovery:
 | 
			
		||||
        namespace: dev # 命名空间。这里使用 dev 开发环境
 | 
			
		||||
        metadata:
 | 
			
		||||
          version: 1.0.0 # 服务实例的版本号,可用于灰度发布
 | 
			
		||||
 | 
			
		||||
--- #################### 配置中心相关配置 ####################
 | 
			
		||||
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    nacos:
 | 
			
		||||
      # Nacos Config 配置项,对应 NacosConfigProperties 配置属性类
 | 
			
		||||
      config:
 | 
			
		||||
        server-addr: 127.0.0.1:8848 # Nacos 服务器地址
 | 
			
		||||
        namespace: dev # 命名空间 dev 的ID,不能直接使用 dev 名称。创建命名空间的时候需要指定ID为 dev,这里使用 dev 开发环境
 | 
			
		||||
        group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
 | 
			
		||||
        name: ${spring.application.name} # 使用的 Nacos 配置集的 dataId,默认为 spring.application.name
 | 
			
		||||
        file-extension: yaml # 使用的 Nacos 配置集的 dataId 的文件拓展名,同时也是 Nacos 配置集的配置格式,默认为 properties
 | 
			
		||||
| 
						 | 
				
			
			@ -1,14 +0,0 @@
 | 
			
		|||
spring:
 | 
			
		||||
  application:
 | 
			
		||||
    name: member-server
 | 
			
		||||
 | 
			
		||||
  profiles:
 | 
			
		||||
    active: local
 | 
			
		||||
 | 
			
		||||
server:
 | 
			
		||||
  port: 48087
 | 
			
		||||
 | 
			
		||||
# 日志文件配置。注意,如果 logging.file.name 不放在 bootstrap.yaml 配置文件,而是放在 application.yaml 中,会导致出现 LOG_FILE_IS_UNDEFINED 文件
 | 
			
		||||
logging:
 | 
			
		||||
  file:
 | 
			
		||||
    name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
 | 
			
		||||
| 
						 | 
				
			
			@ -138,7 +138,6 @@ logging:
 | 
			
		|||
  level:
 | 
			
		||||
    # 配置自己写的 MyBatis Mapper 打印日志
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql: debug
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info
 | 
			
		||||
    cn.iocoder.yudao.module.system.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info
 | 
			
		||||
    org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿:先禁用,Spring Boot 3.X 存在部分错误的 WARN 提示
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue