上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 98 下一页
摘要: 一、过程 1、项目启动就监听配置文件变化 2、发生变化后拿到变化值 3、发送邮件 二、配置 1、位置:微服务启动类 2、具体实现 @Bean public ApplicationRunner applicationRunner(NacosConfigManager nacosConfigManage 阅读全文
posted @ 2025-06-07 16:19 市丸银 阅读(107) 评论(0) 推荐(0)
摘要: 修改nacos的的配置,微服务相应的数据也会改变 一、引入依赖 <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> < 阅读全文
posted @ 2025-06-07 11:52 市丸银 阅读(269) 评论(0) 推荐(0)
摘要: 一、引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-loadbalancer</artifactId> </dependency> 二、使用@LoadBal 阅读全文
posted @ 2025-06-07 10:45 市丸银 阅读(43) 评论(0) 推荐(0)
摘要: 一、引入依赖那个微服务使用远程调用,在那个微服务引入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-loadbalancer</artifactId> </de 阅读全文
posted @ 2025-06-07 10:31 市丸银 阅读(18) 评论(0) 推荐(0)
摘要: 一、准备工作 1、新建model项目, 抽取微服务中的的model 2、在微服务的父项目中引入 model 依赖 <dependency> <groupId>com.wt</groupId> <artifactId>model</artifactId> <version>0.0.1-SNAPSHOT 阅读全文
posted @ 2025-06-07 09:46 市丸银 阅读(46) 评论(0) 推荐(0)
摘要: 一、服务注册 1、依赖 <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> </dependency> 2、yaml 阅读全文
posted @ 2025-06-05 21:35 市丸银 阅读(67) 评论(0) 推荐(0)
摘要: 一、安装 1、官网:https://nacos.io/zh-cn/docs/quick-start.html?spm=7145af80.3bfb50d8.0.0.74e42fa5c2g2WH 2、下载、解压 3、启动(windows) startup.cmd -m standalone 4、检验 h 阅读全文
posted @ 2025-06-05 21:16 市丸银 阅读(22) 评论(0) 推荐(0)
摘要: 一、官网 https://sca.aliyun.com/docs/2023/overview/what-is-sca/ 二、知识点 微服务:SpringBoot 注册中心/配置中心:Spring Cloud Alibaba Nacos 网关:Spring Cloud Gateway 远程调用:Spr 阅读全文
posted @ 2025-06-04 21:21 市丸银 阅读(22) 评论(0) 推荐(0)
摘要: 案例 package com.wt.forkjoin; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.concurrent.RecursiveT 阅读全文
posted @ 2025-06-02 17:13 市丸银 阅读(18) 评论(0) 推荐(0)
摘要: 一、七个参数 int corePoolSize, // 常驻线程数量(核心) int maximumPoolSize, // 最大线程数量 long keepAliveTime, // 线程存活时间 TimeUnit unit, // 线程存活单位 BlockingQueue<Runnable> w 阅读全文
posted @ 2025-06-02 16:00 市丸银 阅读(26) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 98 下一页