调整 pom 结构
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
bootstrap:
|
||||
enabled: true
|
||||
data-id: account-server
|
||||
group: DEFAULT_GROUP
|
||||
auto-refresh: true
|
||||
server-addr: 101.37.12.135:8848
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
file-extension: yaml
|
||||
discovery:
|
||||
server-addr: 101.37.12.135:8848
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
|
||||
@@ -6,6 +6,8 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: account-server
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
|
||||
@@ -30,5 +30,32 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot与Nacos整合的核心依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>2023.0.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 配置管理依赖,如果你需要配置管理功能 -->
|
||||
<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>4.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<version>4.2.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -18,4 +18,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -2,11 +2,15 @@ package com.czg;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
public class SystemApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
bootstrap:
|
||||
enabled: true
|
||||
data-id: system-server
|
||||
group: DEFAULT_GROUP
|
||||
auto-refresh: true
|
||||
server-addr: 101.37.12.135:8848
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
file-extension: yaml
|
||||
discovery:
|
||||
server-addr: 101.37.12.135:8848
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
|
||||
@@ -4,6 +4,8 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: system-server
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
config: classpath:logback.xml
|
||||
|
||||
Reference in New Issue
Block a user