-
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.
* Bug fix on test case * Polish #327 & #325 * Polish #321 * Polish #220 no program * Switch Yaml file * Update version to be 0.2.0 * Polish #218 * Update Documents * Fix the test case's bugs * Fix plugins' issues * Fix test-cases * Fix test cases * Fixes an issue on DubboMvcEndpoint * Polish: Fix a relaxed property name issue * Optimize Awaiting implementation * Remove author from JavaDoc * Refactor * Merge * Update dependencies and implementations * Update Samples * Fix the test cases
- Loading branch information
1 parent
a5b15d7
commit e99a9f5
Showing
45 changed files
with
1,535 additions
and
200 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
/** | ||
* {@link DubboAutoConfiguration} Test On multiple Dubbo Configuration | ||
* | ||
* @author <a href="mailto:[email protected]">Mercy</a> | ||
* @since 1.0.0 | ||
*/ | ||
@RunWith(SpringJUnit4ClassRunner.class) | ||
|
@@ -152,7 +153,7 @@ public class DubboAutoConfigurationOnMultipleConfigTest { | |
public void testMultipleDubboConfigBindingProperties() { | ||
|
||
|
||
Assert.assertEquals(2, applications.size()); | ||
Assert.assertEquals(3, applications.size()); | ||
|
||
Assert.assertEquals(1, modules.size()); | ||
|
||
|
@@ -176,7 +177,7 @@ public void testApplicationContext() { | |
*/ | ||
Map<String, ApplicationConfig> applications = beansOfTypeIncludingAncestors(applicationContext, ApplicationConfig.class); | ||
|
||
Assert.assertEquals(2, applications.size()); | ||
Assert.assertEquals(3, applications.size()); | ||
|
||
/** | ||
* Multiple {@link ModuleConfig} | ||
|
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
74 changes: 74 additions & 0 deletions
74
dubbo-spring-boot-samples/auto-configure-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,74 @@ | ||
<!-- | ||
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. | ||
--> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>com.alibaba.boot.samples</groupId> | ||
<artifactId>dubbo-spring-boot-auto-configure-samples</artifactId> | ||
<version>0.1.2-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>dubbo-spring-boot-auto-configure-consumer-sample</artifactId> | ||
<name>Dubbo Spring Boot Samples : Auto-Configure :: Consumer Sample</name> | ||
<dependencies> | ||
|
||
<!-- Spring Boot dependencies --> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.alibaba.boot</groupId> | ||
<artifactId>dubbo-spring-boot-starter</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>dubbo</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>dubbo-spring-boot-sample-api</artifactId> | ||
<version>${project.version}</version> | ||
</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> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
56 changes: 56 additions & 0 deletions
56
...m/alibaba/boot/dubbo/demo/consumer/bootstrap/DubboAutoConfigurationConsumerBootstrap.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,56 @@ | ||
/* | ||
* 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 com.alibaba.boot.dubbo.demo.consumer.bootstrap; | ||
|
||
import com.alibaba.boot.dubbo.demo.consumer.DemoService; | ||
import com.alibaba.dubbo.config.annotation.Reference; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.ApplicationArguments; | ||
import org.springframework.boot.ApplicationRunner; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
/** | ||
* Dubbo Auto Configuration Consumer Bootstrap | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
@EnableAutoConfiguration | ||
public class DubboAutoConfigurationConsumerBootstrap { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(getClass()); | ||
|
||
@Reference(version = "1.0.0", url = "dubbo://localhost:12345") | ||
private DemoService demoService; | ||
|
||
@Bean | ||
public ApplicationRunner runner() { | ||
return new ApplicationRunner() { | ||
@Override | ||
public void run(ApplicationArguments args) throws Exception { | ||
logger.info(demoService.sayHello("mercyblitz")); | ||
} | ||
}; | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(DubboAutoConfigurationConsumerBootstrap.class).close(); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ng-boot-samples/auto-configure-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,3 @@ | ||
spring: | ||
application: | ||
name: dubbo-auto-configure-consumer-sample |
Oops, something went wrong.