Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dict
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈文顺
dict
Commits
ce6078fc
Commit
ce6078fc
authored
Nov 16, 2018
by
yong.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add eureka server
parent
6a4146d5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
0 deletions
+70
-0
eureka-server/pom.xml
+41
-0
eureka-server/src/main/java/com/freemud/demo/EurekaServerApplication.java
+18
-0
eureka-server/src/main/resources/application.yml
+11
-0
No files found.
eureka-server/pom.xml
0 → 100644
View file @
ce6078fc
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
spring-demo-parent
</artifactId>
<groupId>
com.freemud.demo
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<name>
eureka-server
</name>
<artifactId>
eureka-server
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
</dependency>
<!--增加eureka-server的依赖-->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-eureka-server
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<!--用于测试的,本例可省略-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
joda-time
</groupId>
<artifactId>
joda-time
</artifactId>
<version>
2.9.5
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
eureka-server/src/main/java/com/freemud/demo/EurekaServerApplication.java
0 → 100644
View file @
ce6078fc
package
com
.
freemud
.
demo
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.server.EnableEurekaServer
;
/**
* @Auther: yong.huang
* @Date: 2018/11/16 11:27
* @Description:
*/
@EnableEurekaServer
@SpringBootApplication
public
class
EurekaServerApplication
{
public
static
void
main
(
String
[]
args
){
SpringApplication
.
run
(
EurekaServerApplication
.
class
,
args
);
}
}
eureka-server/src/main/resources/application.yml
0 → 100644
View file @
ce6078fc
spring
:
application
:
name
:
eureka-server
server
:
port
:
8761
#启动端口
eureka
:
client
:
registerWithEureka
:
false
#false:不作为一个客户端注册到注册中心
fetchRegistry
:
false
#为true时,可以启动,但报异常:Cannot execute request on any known server
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment