update springcloud 2024

This commit is contained in:
疯狂的狮子Li
2025-01-17 17:01:11 +08:00
parent 3bdb837196
commit 20614184ec
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<spring-boot.version>3.4.1</spring-boot.version>
<spring-cloud.version>2023.0.5</spring-cloud.version>
<spring-cloud.version>2024.0.0</spring-cloud.version>
<spring-boot-admin.version>3.4.1</spring-boot-admin.version>
<mybatis.version>3.5.16</mybatis.version>
<mybatis-plus.version>3.5.10</mybatis-plus.version>

View File

@@ -30,7 +30,7 @@ public class SentinelCustomAutoConfiguration {
private DiscoveryClient discoveryClient;
@Bean
public void sentinelInit() {
public Object sentinelInit() {
if (StringUtils.isNotBlank(customProperties.getServerName())) {
List<ServiceInstance> instances = discoveryClient.getInstances(customProperties.getServerName());
String serverList = StreamUtils.join(instances, instance ->
@@ -45,6 +45,7 @@ public class SentinelCustomAutoConfiguration {
}
// 手动初始化 sentinel
InitExecutor.doInit();
return new Object();
}