Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Liuhp534 committed Mar 17, 2019
0 parents commit 31bb398
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/bin/

# Compiled class file
*.class
*.classpath
*.settings
*.project
# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
/target/


# IntelliJ project files
.idea
*.iml
out
gen
project/
logs
.project
.settings
.classpath
target
logs
59 changes: 59 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<groupId>cn.liuhp</groupId>
<artifactId>eureka-server</artifactId>
<version>1.0-SNAPSHOT</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>


</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.SR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<!-- springboot maven打包-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>cn.liuhp.EurekaApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
19 changes: 19 additions & 0 deletions src/main/java/liuhp/EurekaApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package liuhp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;

/**
* @description: 启动类 a
* @author: hz16092620
* @create: 2019-03-07 10:56
*/
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {

public static void main(String[] args) {
SpringApplication.run(EurekaApplication.class, args);
}
}
16 changes: 16 additions & 0 deletions src/main/resources/config/application-xxx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

############################################################
#
# Server 服务端相关配置
#
############################################################
# 配置API的端口号
server:
port: 8090
tomcat:
acceptCount: 1
max-connections: 1
max-threads: 1
#关闭安全限制


22 changes: 22 additions & 0 deletions src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
############################################################
#
# Server 服务端相关配置
#
############################################################
# 配置应用的端口号
server.port = 8761
# tomcat连接队列最大数量 设置0则消息,估计默认为100的
#server.tomcat.acceptCount=1
#tomcat最大线程数量
#server.tomcat.maxThreads=1
#tomcat最大连接数
#server.tomcat.maxConnections=2

#关闭安全限制
#management.endpoints.web.exposure.include=*

#eureka注册中心配置
#不向注册中心注册
eureka.client.registerWithEureka=false
#不获取注册信息
eureka.client.fetchRegistry=false

0 comments on commit 31bb398

Please sign in to comment.