首页
  • 2024.1.1.0
  • 2024.1.1.1
  • 2024.1.2.0
  • 2024.1.3.0
  • Java
  • Linux
  • Deploy
  • Application
关于
友情链接
GitHub (opens new window)

Xiao ku

板砖师傅
首页
  • 2024.1.1.0
  • 2024.1.1.1
  • 2024.1.2.0
  • 2024.1.3.0
  • Java
  • Linux
  • Deploy
  • Application
关于
友情链接
GitHub (opens new window)
  • 版本日志
  • 贡献清单
  • 2024.1.3.0

    • Simple-Starter概述
    • 自动装配模块

      • simple-starter-web
      • simple-starter-redisson
      • simple-starter-s3
      • simple-starter-socketio
      • simple-starter-grpc
      • simple-starter-datasource
      • simple-starter-freemarker
      • simple-starter-cloud
        • 简介
        • 引入依赖
        • 配置项
          • Nacos远程配置中心
          • 本地工程配置
          • 开启Feign日志打印
      • simple-starter-encrypt
      • simple-starter-dict
      • simple-starter-email
      • simple-starter-gateway
      • simple-starter-package
    • 服务类模块

    • 工具类模块

  • 2024.1.2.0

  • 2024.1.1.1

  • 2024.1.1.0

  • OpenSource
  • 2024.1.3.0
  • 自动装配模块
xiaoku
2023-04-04
目录

simple-starter-cloud

# 简介

将常用微服务应用的依赖集成,便于使用
增加日志配置对象,便于开启

# 引入依赖

    <dependencies>
        <dependency>
            <groupId>cn.iosd</groupId>
            <artifactId>simple-starter-cloud</artifactId>
            <version>Version</version>
        </dependency>
    </dependencies>
1
2
3
4
5
6
7

# 配置项

# Nacos远程配置中心

示例:application.yml 公共-通用配置

simple:
  openApi:
    version: 1.0.0
    contact:
      name: ok1996
      url: https://ok96.cn
      email: ku29@qq.com
1
2
3
4
5
6
7

示例:simple-demo-cloud.yml

server:
  port: 11100
1
2

# 本地工程配置

application.yml

spring:
  application:
    name: simple-demo-cloud
  cloud:
    nacos:
      server-addr: http://127.0.0.1:8848
      username:
      password:
      discovery:
        registerEnabled: true
        namespace:
      config:
        namespace:
        file-extension: yml
  config:
    import:
      - nacos:application.yml
      - nacos:simple-demo-cloud.yml?group=DEFAULT_GROUP&refreshEnabled=false
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# 开启Feign日志打印

配置项

simple:
  feign:
    # 开启日志记录,缺省默认开启
    logger:
      enabled: true
logging:
  level:
    # 声明包位置的Feign日志级别为debug,打印日志详情
    cn:
      iosd: debug
1
2
3
4
5
6
7
8
9
10
上次更新: 2024/03/25, 02:28:08
simple-starter-freemarker
simple-starter-encrypt

← simple-starter-freemarker simple-starter-encrypt→

Copyright © 2019-2024
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式