-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.7.x' of https://github.com/mercyblitz/dubbo-spring-bo…
…ot-project into mercyblitz-2.7.x
- Loading branch information
Showing
42 changed files
with
780 additions
and
20 deletions.
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
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
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
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
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
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
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
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
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,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> |
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
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
81 changes: 81 additions & 0 deletions
81
...o-spring-boot-samples/service-introspection-samples/nacos-samples/consumer-sample/pom.xml
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,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> |
48 changes: 48 additions & 0 deletions
48
...pring/boot/sample/consumer/bootstrap/DubboNacosServiceIntrospectionConsumerBootstrap.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,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")); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...ce-introspection-samples/nacos-samples/consumer-sample/src/main/resources/application.yml
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,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}®istry-type=service |
23 changes: 23 additions & 0 deletions
23
dubbo-spring-boot-samples/service-introspection-samples/nacos-samples/pom.xml
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,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> |
Oops, something went wrong.