Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ot-project into mercyblitz-2.7.x
  • Loading branch information
mercyblitz committed May 25, 2020
2 parents 62629ee + 2608b39 commit 50996fb
Show file tree
Hide file tree
Showing 42 changed files with 780 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-auto-configure-consumer-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Auto-Configure :: Consumer Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Auto-Configure :: Consumer Sample</name>
<dependencies>

<!-- Spring Boot dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion dubbo-spring-boot-samples/auto-configure-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-auto-configure-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Auto-Configure</name>
<name>Apache Dubbo Spring Boot :: Samples :: Auto-Configure</name>
<description>Apache Dubbo Spring Boot Auto-Configure Samples</description>
<packaging>pom</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-auto-configure-provider-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Auto-Configure :: Provider Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Auto-Configure :: Provider Sample</name>

<dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-externalized-configuration-consumer-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration :: Consumer Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Externalized Configuration :: Consumer Sample</name>
<dependencies>

<!-- Spring Boot dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-externalized-configuration-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration</name>
<name>Apache Dubbo Spring Boot :: Samples :: Externalized Configuration</name>
<description>Apache Dubbo Spring Boot Externalized Configuration Samples</description>
<packaging>pom</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-externalized-configuration-provider-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Externalized Configuration :: Provider Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Externalized Configuration :: Provider Sample</name>

<dependencies>

Expand Down
4 changes: 2 additions & 2 deletions dubbo-spring-boot-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
<module>sample-api</module>
<module>auto-configure-samples</module>
<module>externalized-configuration-samples</module>
<module>dubbo-registry-zookeeper-samples</module>
<module>dubbo-registry-nacos-samples</module>
<module>registry-samples</module>
<module>service-introspection-samples</module>
</modules>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
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>dubbo-spring-boot-registry-nacos-samples</artifactId>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-registry-nacos-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-nacos-consumer-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Nacos :: Consumer Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Nacos :: Consumer Sample</name>

<properties>
<nacos.version>1.2.1</nacos.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,22 @@
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>dubbo-spring-boot-samples</artifactId>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-registry-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-nacos-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Nacos</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Nacos</name>
<description>Apache Dubbo Spring Boot Registry Nacos Samples</description>
<packaging>pom</packaging>


<modules>
<module>provider-sample</module>
<module>consumer-sample</module>
<module>provider-sample</module>
</modules>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-nacos-provider-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Nacos :: Provider Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Nacos :: Provider Sample</name>

<properties>
<nacos.version>1.2.1</nacos.version>
Expand Down
23 changes: 23 additions & 0 deletions dubbo-spring-boot-samples/registry-samples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples :: Registry</name>
<description>Apache Dubbo Spring Boot Registry Samples</description>
<packaging>pom</packaging>

<modules>
<module>nacos-samples</module>
<module>zookeeper-samples</module>
</modules>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-zookeeper-consumer-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper :: Consumer Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Zookeeper :: Consumer Sample</name>
<dependencies>

<!-- Spring Boot dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-zookeeper-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Zookeeper</name>
<description>Apache Dubbo Spring Boot Registry Zookeeper Samples</description>
<packaging>pom</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-registry-zookeeper-provider-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : Registry Zookeeper :: Provider Sample</name>
<name>Apache Dubbo Spring Boot :: Samples :: Registry Zookeeper :: Provider Sample</name>

<dependencies>

Expand Down
2 changes: 1 addition & 1 deletion dubbo-spring-boot-samples/sample-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-sample-api</artifactId>
<name>Apache Dubbo Spring Boot :: Samples : API</name>
<name>Apache Dubbo Spring Boot :: Samples :: API</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?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>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-service-introspection-nacos-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-service-introspection-nacos-consumer-sample</artifactId>
<name>Apache Dubbo Spring Boot :: Samples :: Service Introspection :: Nacos :: Consumer Sample</name>
<description>Apache Dubbo Spring Boot Service Introspection Nacos consumer Sample</description>
<packaging>jar</packaging>

<properties>
<nacos.version>1.2.1</nacos.version>
</properties>

<dependencies>
<!-- Spring Boot dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${revision}</version>
</dependency>

<!-- Dubbo Registry Nacos -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-registry-nacos</artifactId>
<version>${revision}</version>
</dependency>

<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-sample-api</artifactId>
<version>${revision}</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>false</executable>
<finalName>${project.artifactId}-${spring-boot.version}</finalName>
<outputDirectory>${user.dir}/target</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
* http://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 org.apache.dubbo.spring.boot.sample.consumer.bootstrap;

import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.spring.boot.demo.consumer.DemoService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
* Dubbo Registry Nacos Consumer Bootstrap
*/
@EnableAutoConfiguration
public class DubboNacosServiceIntrospectionConsumerBootstrap {

private final Logger logger = LoggerFactory.getLogger(getClass());

@DubboReference(version = "${demo.service.version}")
private DemoService demoService;

public static void main(String[] args) {
SpringApplication.run(DubboNacosServiceIntrospectionConsumerBootstrap.class).close();
}

@Bean
public ApplicationRunner runner() {
return args -> logger.info(demoService.sayHello("mercyblitz"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
spring:
application:
name: dubbo-nacos-service-introspection-consumer-sample

demo:
service:
version: 1.0.0

nacos:
host: 127.0.0.1
port: 8848
username: nacos
password: nacos

dubbo:
registry:
address: nacos://${nacos.host}:${nacos.port}/?username=${nacos.username}&password=${nacos.password}&registry-type=service
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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>
<groupId>org.apache.dubbo.samples</groupId>
<artifactId>dubbo-spring-boot-service-introspection-samples</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>dubbo-spring-boot-service-introspection-nacos-samples</artifactId>
<name>Apache Dubbo Spring Boot :: Samples :: Service Introspection :: Nacos</name>
<description>Apache Dubbo Spring Boot Service Introspection Nacos Samples</description>
<packaging>pom</packaging>

<modules>
<module>provider-sample</module>
<module>consumer-sample</module>
</modules>

</project>
Loading

0 comments on commit 50996fb

Please sign in to comment.