当前位置: 首页 > news >正文

记录一下spring-cloud-starter-alibaba-nacos-config 2023.0.3.2与springboot版本及配置问题

依赖:

 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.2.4</version><relativePath/> <!-- lookup parent from repository --></parent>

对应的nacos-config配置:

<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId><version>2023.0.3.2</version>
</dependency>
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId><version>3.1.1</version>
</dependency>

对应的配置文件:

bootstrap.yml

server:port: 1104
spring:application:name: ai-qywxbotprofiles:active: dev

bootstrap-dev.yml

server:port: 1104spring:cloud:nacos:config:server-addr: xxxxxx#没有后缀名报错file-extension: yamlusername: nacospassword: nacosconfig:import:- optional:nacos:${spring.application.name}-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}#  datasource:#    url: jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&characterEncoding=utf-8#    username: root#    password: 123456#    driver-class-name: com.mysql.cj.jdbc.Driver#mybatis-plus:#  #config-location: classpath:mybatis/mybatis-config.xml  #?????#  mapper-locations: classpath:mybatis/mapper/*.xml#  type-aliases-package: org.example.xiaomaibu.mybatis.entity

http://www.dtcms.com/a/175926.html

相关文章:

  • kettle从入门到精通 第九十六课 ETL之kettle Elasticsearch 增删改查彻底掌握
  • excel 批量导出图片并指定命名
  • FPGA 纯逻辑NVME raid0 IP核
  • 常用设计模式在 Spring Boot 项目中的实战案例
  • 当当狸智能天文望远镜 TW2 | 用科技触摸星辰,让探索触手可及
  • 第十一节:图像处理基础-图像阈值处理
  • 16.Excel:打印技巧
  • ROS2: 服务通信
  • Android 数据持久化之数据库存储 Room 框架
  • RDD的处理过程
  • 远程桌面软件推荐
  • baobab查看磁盘空间占用
  • 使用node.js创建一个简单的服务器
  • LLaMA-Factory微调DeepSeek-R1-Distill-Qwen-7B
  • 微软输入法常用快捷键介绍以及调教技巧
  • 【Hive入门】Hive数据导入与导出:批量操作与HDFS数据迁移完全指南
  • 设计模式之状态模式
  • 企业该如何选择合适的DDOS防护?
  • 交替序列长度的最大值
  • AI辅助DevOps与自动化测试:重构软件工程效率边界
  • 2025年数字藏品行业DDoS攻防指南:技术升级与合规防御双轨制
  • 系统思考:教育焦虑恶性循环分析
  • 解决leetcode第3537题填充特殊网格
  • CentOS服务器中如何解决内存泄漏问题?
  • 微信小程序pinia的应用
  • 矩阵扩展-算卷积算法介绍及C语言代码实现
  • 软件架构评估方法全面解析
  • c# LINQ-Query01
  • 利用动态数字孪生:Franka Research 3 机械臂在机器人策略评估中的创新实践——基于Real-is-Sim框架的仿真与现实闭环验证
  • 5.0.4 VisualStateManager(视觉状态管理器)使用说明