-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
194 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,5 @@ hs_err_pid* | |
*.classpath | ||
*.project | ||
*.settings/* | ||
/target/ | ||
/target/ | ||
*/target/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?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> | ||
|
||
<description> | ||
soraka is a spring cloud sample. | ||
</description> | ||
|
||
<!--基本信息--> | ||
<groupId>com.soraka</groupId> | ||
<artifactId>soraka</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<developers> | ||
<developer> | ||
<name>北有风雪</name> | ||
<url>https://gitee.com/beiyoufx/soraka</url> | ||
</developer> | ||
</developers> | ||
|
||
<!--属性--> | ||
<properties> | ||
<!-- 文件拷贝时的编码 --> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<!-- 编译时的编码 --> | ||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding> | ||
<fastjson.version>1.2.7</fastjson.version> | ||
<spring.version>4.2.2.RELEASE</spring.version> | ||
<mybatis.spring.version>1.2.4</mybatis.spring.version> | ||
<mybatis.version>3.2.6</mybatis.version> | ||
<dubbo.version>2.5.3</dubbo.version> | ||
<junit.version>4.12</junit.version> | ||
<log4j.version>1.2.17</log4j.version> | ||
<slf4j.version>1.7.7</slf4j.version> | ||
<xstream.version>1.4.4</xstream.version> | ||
<druid.version>1.0.26</druid.version> | ||
<mysql.connector.version>5.1.22</mysql.connector.version> | ||
<jackson.version>2.9.0</jackson.version> | ||
</properties> | ||
|
||
<!--依赖--> | ||
<dependencies></dependencies> | ||
<!--依赖--> | ||
<dependencyManagement></dependencyManagement> | ||
|
||
<!--仓库--> | ||
<repositories> | ||
<repository> | ||
<id>public</id> | ||
<name>aliyun nexus</name> | ||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>public</id> | ||
<name>aliyun nexus</name> | ||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?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>com.soraka</groupId> | ||
<artifactId>soraka-eureka</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>soraka-eureka</name> | ||
<description>soraka注册中心</description> | ||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.0.4.RELEASE</version> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
|
||
<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>Finchley.SR1</spring-cloud.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.cloud</groupId> | ||
<artifactId>spring-cloud-dependencies</artifactId> | ||
<version>${spring-cloud.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
20 changes: 20 additions & 0 deletions
20
soraka-eureka/src/main/java/com/soraka/eureka/SorakaEurekaApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.soraka.eureka; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; | ||
|
||
/** | ||
* Soraka注册中心 | ||
* | ||
* @author yongjie.teng | ||
* @date 2018/8/9 | ||
* @package com.soraka.eureka | ||
*/ | ||
@EnableEurekaServer | ||
@SpringBootApplication | ||
public class SorakaEurekaApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(SorakaEurekaApplication.class, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
spring: | ||
application: | ||
name: soraka-eureka | ||
|
||
server: | ||
port: 8001 | ||
|
||
eureka: | ||
instance: | ||
hostname: localhost | ||
preferIpAddress: true | ||
instance-id: ${spring.cloud.client.ipAddress}:${server.port} | ||
client: | ||
registerWithEureka: false | ||
fetchRegistry: false | ||
|
20 changes: 20 additions & 0 deletions
20
soraka-eureka/src/test/java/com/soraka/eureka/SorakaEurekaApplicationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.soraka.eureka; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.junit4.SpringRunner; | ||
|
||
/** | ||
* @author yongjie.teng | ||
* @date 2018/8/9 | ||
* @package com.soraka.eureka | ||
*/ | ||
@RunWith(SpringRunner.class) | ||
@SpringBootTest | ||
public class SorakaEurekaApplicationTest { | ||
|
||
@Test | ||
public void contextLoads() { | ||
} | ||
} |