Commit 412d287c by yong.huang

增加eureka server

parent 9531146f
eureka-server @ 6a9eb4b4
Subproject commit 6a9eb4b438697bb7cfc1f55a8cffb4754142f20f
......@@ -20,6 +20,7 @@
<module>springboot-demo</module>
<module>demo-sdk</module>
<module>demo-service</module>
<module>eureka-server</module>
</modules>
......@@ -30,12 +31,39 @@
<spring-cloud.version>Edgware.SR2</spring-cloud.version>
<mybatis3.version>1.3.0</mybatis3.version>
<mapper.version>1.1.1</mapper.version>
<spring-cloud.version>Dalston.SR4</spring-cloud.version>
</properties>
<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>
<dependency>
<groupId>com.freemud.demo</groupId>
<artifactId>demo-service</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.freemud.demo</groupId>
<artifactId>demo-sdk</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId>
<version>1.4.9-release</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.6.1</version>
......@@ -46,6 +74,24 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.26</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.32</version>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -58,6 +104,33 @@
</dependency>
</dependencies>
<!-- 配置全局maven私服-->
<repositories>
<repository>
<id>freemud</id>
<name>freemud Public Repositories</name>
<url>http://115.159.2.190:7654/nexus/content/groups/public/</url>
</repository>
<repository>
<id>freemud-hosted-snapshot</id>
<name>ctxsdhy-hosted-snapshot</name>
<url>http://115.159.2.190:7654/nexus/content/repositories/freemud-hosted-snapshot/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -25,40 +25,26 @@
<java.version>1.8</java.version>
</properties>
<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>
<dependencies>
<dependency>
<groupId>com.freemud.demo</groupId>
<artifactId>demo-service</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.freemud.demo</groupId>
<artifactId>demo-sdk</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId>
<version>1.4.9-release</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
......@@ -75,9 +61,13 @@
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
......@@ -89,13 +79,11 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.26</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.32</version>
</dependency>
<dependency>
......
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.support.spring.FastJsonpHttpMessageConverter4;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.converter.HttpMessageConverter;
......@@ -11,6 +12,7 @@ import org.springframework.http.converter.HttpMessageConverter;
@SpringBootApplication
@ComponentScan(basePackages = "com.freemud, cn.freemud")
@MapperScan(basePackages = "com.freemud.demo.mapper")
@EnableEurekaClient
public class SpringbootDemoApplication {
public static void main(String[] args) {
......
spring:
application:
name: sarding-jdbc
name: springboot-demo
redis:
host: 115.159.67.166
port: 5289
......@@ -56,4 +56,13 @@ logging:
swagger_enable: true
eureka:
instance:
statusPageUrlPath: ${management.context-path}/info
healthCheckUrlPath: ${management.context-path}/health
preferIpAddress: true
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment