提交 cc79c078 编写于 作者: Q qinyingjie

fix:添加依赖

上级 b0b3f23d
......@@ -28,6 +28,7 @@
<module>springcloud-service-goods</module>
<module>springcloud-service-common</module>
<module>springcloud-service-portal</module>
<module>springcloud-service-eureka</module>
</modules>
<dependencyManagement>
......
......@@ -12,7 +12,7 @@
<name>springcloud-service-eureka</name>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>2022.0.0</spring-cloud.version>
<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
</properties>
<dependencies>
<dependency>
......@@ -30,7 +30,7 @@
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
......@@ -51,15 +51,15 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>netflix-candidates</id>
<name>Netflix Candidates</name>
<url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>netflix-candidates</id>-->
<!-- <name>Netflix Candidates</name>-->
<!-- <url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </repository>-->
<!-- </repositories>-->
</project>
......@@ -3,16 +3,10 @@ package com.kwan.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableEurekaServer
@SpringBootApplication
public class SpringcloudServiceEurekaApplication {
public class EurekaApplication {
public static void main(String[] args) {
SpringApplication.run(SpringcloudServiceEurekaApplication.class, args);
SpringApplication.run(EurekaApplication.class, args);
}
}
}
\ No newline at end of file
......@@ -2,5 +2,15 @@
server:
port: 8761
spring:
application:
name: eurka-server
eureka
\ No newline at end of file
eureka:
instance:
hostname: localhost
client:
register-with-eureka: false #由于该应用为注册中心,所以设置 为 false, 代表不向注册中心注册自己。
fetch-registry: false #由于注册中心的职责就是维护服务实例, 它并不需要去检索服务, 所以也设置为 false。
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
\ No newline at end of file
......@@ -4,7 +4,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class SpringcloudServiceEurekaApplicationTests {
public class EurekaApplicationTests {
@Test
void contextLoads() {
......
......@@ -10,6 +10,12 @@
<artifactId>springcloud-service-goods</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springcloud-service-goods</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.SR12</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>com.kwan.springcloud</groupId>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册