1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

(没成功,放弃尝试)去除注册中心 nacos;添加 Eureka;升级Spring Cloud版本为2022.0.1;JDK版本为17

This commit is contained in:
2023-03-01 17:24:31 +08:00
parent 0f43fa20b6
commit b7d2a5efd4
25 changed files with 154 additions and 103 deletions

View File

@@ -13,8 +13,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies>
@@ -67,28 +67,16 @@
</dependency>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Nacos -->
<!-- Eureka Discovery Client -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!-- 热部署 -->
<!--<dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-devtools</artifactId>-->
<!-- <version>2.7.5</version>-->
<!--</dependency>-->
</dependencies>

View File

@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
// import org.springframework.cloud.netflix.eureka.server.EnableEurekaClient;
// 启动类
@SpringBootApplication

View File

@@ -11,13 +11,13 @@ mybatis:
spring:
application:
name: microservice-provider-user
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=utf8&useSSL=false
username: root
password: root
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/