1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

update maven coordinates & docs

This commit is contained in:
fangjian0423
2019-07-10 17:15:25 +08:00
parent cfd2544ff0
commit fd9a8f8816
60 changed files with 162 additions and 41 deletions

View File

@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-discovery-with-spring-cloud-config-example</artifactId>
<artifactId>nacos-discovery-spring-cloud-config-client</artifactId>
<packaging>jar</packaging>
<description>Example demonstrating how to use nacos discovery</description>

View File

@@ -1,10 +1,12 @@
spring:
application:
name: client
cloud:
nacos:
discovery:
server-addr: localhost:8848
config:
discovery:
enabled: true
spring:
application:
name: client
cloud:
nacos:
discovery:
server-addr: localhost:8848
config:
discovery:
enabled: true
profiles:
active: dev

View File

@@ -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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.alibaba.cloud</groupId>
<artifactId>nacos-discovery-example</artifactId>
<version>0.9.1.BUILD-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-discovery-with-spring-cloud-config-example</artifactId>
<packaging>jar</packaging>
<description>Example demonstrating how to use nacos discovery</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>alibaba-nacos-discovery-spring-cloud-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.examples;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;
/**
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableConfigServer
public class SpringCloudConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(SpringCloudConfigServerApplication.class, args);
}
}

View File

@@ -0,0 +1,16 @@
server:
port: 7070
spring:
application:
name: configserver
cloud:
nacos:
discovery:
server-addr: localhost:8848
config:
server:
git:
uri: https://github.com/fangjian0423/blogimages
search-paths: /

View File

@@ -19,6 +19,7 @@
<modules>
<module>nacos-discovery-consumer-example</module>
<module>nacos-discovery-provider-example</module>
<module>nacos-discovery-with-spring-cloud-config-example</module>
<module>nacos-discovery-spring-cloud-config-client</module>
<module>nacos-discovery-spring-cloud-config-server</module>
</modules>
</project>