This is an automated email from the ASF dual-hosted git repository. albumenj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git
The following commit(s) were added to refs/heads/master by this push: new 93ef6047 add rest test case with token (#698) 93ef6047 is described below commit 93ef60479342b3c26497188e0e137f4a2a7f4e73 Author: ShenFeng312 <49786112+shenfeng...@users.noreply.github.com> AuthorDate: Tue Jan 17 10:57:48 2023 +0800 add rest test case with token (#698) --- .../case-configuration.yml | 45 ++++++++++++ .../case-versions.conf | 25 +++++++ .../dubbo-samples-rest-withtoken-api/pom.xml | 38 ++++++++++ .../samples/rest/withtoken/api/DemoService.java | 34 +++++++++ .../dubbo-samples-rest-withtoken-consumer/pom.xml | 83 +++++++++++++++++++++ .../dubbo/rest/withtoken/consumer/Application.java | 50 +++++++++++++ .../src/main/resources/application.yml | 24 +++++++ .../rest/withtoken/consumer/test/ConsumerTest.java | 38 ++++++++++ .../dubbo-samples-rest-withtoken-provider/pom.xml | 78 ++++++++++++++++++++ .../dubbo/rest/withtoken/provider/Application.java | 36 ++++++++++ .../provider/service/impl/DemoServiceImpl.java | 34 +++++++++ .../src/main/resources/application.yml | 25 +++++++ .../dubbo-samples-rest-withtoken/pom.xml | 84 ++++++++++++++++++++++ 99-integration/pom.xml | 1 + 14 files changed, 595 insertions(+) diff --git a/99-integration/dubbo-samples-rest-withtoken/case-configuration.yml b/99-integration/dubbo-samples-rest-withtoken/case-configuration.yml new file mode 100644 index 00000000..2aa04ecf --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/case-configuration.yml @@ -0,0 +1,45 @@ +# 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. + + +services: + zookeeper: + image: zookeeper:latest + + dubbo-samples-rest-withtoken-provider: + type: app + basedir: dubbo-samples-rest-withtoken-provider + mainClass: org.apache.dubbo.rest.withtoken.provider.Application + systemProps: + - zookeeper.address=zookeeper + waitPortsBeforeRun: + - zookeeper:2181 + depends_on: + - zookeeper + + dubbo-samples-rest-withtoken-consumer: + type: test + basedir: dubbo-samples-rest-withtoken-consumer + tests: + - "**/**Test.class" + systemProps: + - zookeeper.address=zookeeper + waitPortsBeforeRun: + - zookeeper:2181 + - dubbo-samples-rest-withtoken-provider:8080 + depends_on: + - zookeeper + - dubbo-samples-rest-withtoken-provider \ No newline at end of file diff --git a/99-integration/dubbo-samples-rest-withtoken/case-versions.conf b/99-integration/dubbo-samples-rest-withtoken/case-versions.conf new file mode 100644 index 00000000..0e40e7ab --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/case-versions.conf @@ -0,0 +1,25 @@ +# +# +# 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. +# + + +# Supported component versions of the test case + +# Spring app +dubbo.version=[ >= 3.2.0 ] +spring.version=5.* +java.version= [<= 11] diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/pom.xml b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/pom.xml new file mode 100644 index 00000000..7574c3f1 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/pom.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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="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> + <artifactId>dubbo-samples-rest-withtoken</artifactId> + <groupId>org.apache.dubbo</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>dubbo-samples-rest-withtoken-api</artifactId> + + <dependencies> + <dependency> + <groupId>org.jboss.resteasy</groupId> + <artifactId>resteasy-jaxrs</artifactId> + <version>3.0.20.Final</version> + </dependency> + </dependencies> + +</project> \ No newline at end of file diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/src/main/java/org/apache/dubbo/samples/rest/withtoken/api/DemoService.java b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/src/main/java/org/apache/dubbo/samples/rest/withtoken/api/DemoService.java new file mode 100644 index 00000000..2a76dbe5 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-api/src/main/java/org/apache/dubbo/samples/rest/withtoken/api/DemoService.java @@ -0,0 +1,34 @@ +/* + * + * 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.samples.rest.withtoken.api; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + + +@Path("/demo") +public interface DemoService { + @Path("/hello") + @GET + @Consumes({MediaType.TEXT_PLAIN}) + String hello(@QueryParam("name") String name); +} diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/pom.xml b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/pom.xml new file mode 100644 index 00000000..156235d4 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/pom.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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="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> + <artifactId>dubbo-samples-rest-withtoken</artifactId> + <groupId>org.apache.dubbo</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>dubbo-samples-rest-withtoken-consumer</artifactId> + + <dependencies> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-samples-rest-withtoken-api</artifactId> + </dependency> + <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>${dubbo.version}</version> + </dependency> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-rpc-rest</artifactId> + </dependency> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-dependencies-zookeeper</artifactId> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-remoting-netty4</artifactId> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${spring-boot-maven-plugin.version}</version> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> \ No newline at end of file diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/java/org/apache/dubbo/rest/withtoken/consumer/Application.java b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/java/org/apache/dubbo/rest/withtoken/consumer/Application.java new file mode 100644 index 00000000..d8a4ee5b --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/java/org/apache/dubbo/rest/withtoken/consumer/Application.java @@ -0,0 +1,50 @@ +/* + * + * 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.rest.withtoken.consumer; + +import org.apache.dubbo.config.annotation.DubboReference; +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.apache.dubbo.samples.rest.withtoken.api.DemoService; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.ConfigurableApplicationContext; + +/** + * @author shenfeng + */ +@SpringBootApplication +@EnableDubbo +public class Application { + public static void main(String[] args) { + ConfigurableApplicationContext context = SpringApplication.run(Application.class, args); + Application application = context.getBean(Application.class); + String result = application.doSayHello("world"); + System.out.println("result: " + result); + } + + private String doSayHello(String world) { + return demoService.hello(world); + } + + @DubboReference(protocol = "rest") + DemoService demoService; + + + +} diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/resources/application.yml b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/resources/application.yml new file mode 100644 index 00000000..63fe7edb --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/main/resources/application.yml @@ -0,0 +1,24 @@ +# 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. +dubbo: + application: + name: dubbo-springboot-rest-consumer + protocol: + name: rest + port: -1 + registry: + id: zk-registry + address: zookeeper://${zookeeper.address:127.0.0.1}:2181 diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/test/java/org/apache/dubbo/rest/withtoken/consumer/test/ConsumerTest.java b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/test/java/org/apache/dubbo/rest/withtoken/consumer/test/ConsumerTest.java new file mode 100644 index 00000000..e98120e8 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-consumer/src/test/java/org/apache/dubbo/rest/withtoken/consumer/test/ConsumerTest.java @@ -0,0 +1,38 @@ +/* + * + * 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.rest.withtoken.consumer.test; + +import org.apache.dubbo.config.annotation.DubboReference; +import org.apache.dubbo.samples.rest.withtoken.api.DemoService; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@SpringBootTest +@RunWith(SpringRunner.class) +public class ConsumerTest { + @DubboReference + private DemoService demoService; + @Test + public void test01(){ + String hello = demoService.hello("1111"); + System.out.println(hello); + } +} diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/pom.xml b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/pom.xml new file mode 100644 index 00000000..42cb2132 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/pom.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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="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> + <artifactId>dubbo-samples-rest-withtoken</artifactId> + <groupId>org.apache.dubbo</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>dubbo-samples-rest-withtoken-provider</artifactId> + + <dependencies> + + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-samples-rest-withtoken-api</artifactId> + </dependency> + <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>${dubbo.version}</version> + </dependency> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-rpc-rest</artifactId> + </dependency> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-dependencies-zookeeper</artifactId> + <type>pom</type> + </dependency> + + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-remoting-netty4</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${spring-boot-maven-plugin.version}</version> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + +</project> \ No newline at end of file diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/Application.java b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/Application.java new file mode 100644 index 00000000..93101897 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/Application.java @@ -0,0 +1,36 @@ +/* + * + * 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.rest.withtoken.provider; + + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @author shenfeng + */ +@SpringBootApplication +@EnableDubbo(scanBasePackages = {"org.apache.dubbo.rest.withtoken.provider.service.impl"}) +public class Application { + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/service/impl/DemoServiceImpl.java b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/service/impl/DemoServiceImpl.java new file mode 100644 index 00000000..81b91b23 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/java/org/apache/dubbo/rest/withtoken/provider/service/impl/DemoServiceImpl.java @@ -0,0 +1,34 @@ +/* + * + * 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.rest.withtoken.provider.service.impl; + +import org.apache.dubbo.config.annotation.DubboService; +import org.apache.dubbo.samples.rest.withtoken.api.DemoService; + +/** + * @author shenfeng + */ +@DubboService(protocol = "rest",token = "true") +public class DemoServiceImpl implements DemoService { + @Override + public String hello(String name) { + return "Hello! " + name; + } +} diff --git a/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/resources/application.yml b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/resources/application.yml new file mode 100644 index 00000000..bbac5ec7 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/dubbo-samples-rest-withtoken-provider/src/main/resources/application.yml @@ -0,0 +1,25 @@ +# 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. + +dubbo: + application: + name: dubbo-springboot-rest-provider + protocol: + name: rest + port: 8080 + registry: + id: zk-registry + address: zookeeper://${zookeeper.address:127.0.0.1}:2181 \ No newline at end of file diff --git a/99-integration/dubbo-samples-rest-withtoken/pom.xml b/99-integration/dubbo-samples-rest-withtoken/pom.xml new file mode 100644 index 00000000..1c756089 --- /dev/null +++ b/99-integration/dubbo-samples-rest-withtoken/pom.xml @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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="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"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>23</version> + <relativePath/> + </parent> + + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-samples-rest-withtoken</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Dubbo Samples Rest</name> + <description>Dubbo Samples Rest Demo</description> + + <properties> + <spring-boot.version>2.1.1.RELEASE</spring-boot.version> + <spring-boot-maven-plugin.version>2.1.1.RELEASE</spring-boot-maven-plugin.version> + <source.level>1.8</source.level> + <target.level>1.8</target.level> + <dubbo.version>3.2.0-beta.3</dubbo.version> + </properties> + + <modules> + <module>dubbo-samples-rest-withtoken-api</module> + <module>dubbo-samples-rest-withtoken-consumer</module> + <module>dubbo-samples-rest-withtoken-provider</module> + </modules> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-samples-rest-withtoken-api</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${spring-boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-bom</artifactId> + <version>${dubbo.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.apache.dubbo</groupId> + <artifactId>dubbo-dependencies-zookeeper</artifactId> + <version>${dubbo.version}</version> + <type>pom</type> + </dependency> + </dependencies> + </dependencyManagement> + +</project> \ No newline at end of file diff --git a/99-integration/pom.xml b/99-integration/pom.xml index dceba3da..14d2c0a5 100644 --- a/99-integration/pom.xml +++ b/99-integration/pom.xml @@ -53,5 +53,6 @@ <module>dubbo-samples-test-11137</module> <module>dubbo-samples-test-11159</module> <module>dubbo-samples-transaction</module> + <module>dubbo-samples-rest-withtoken</module> </modules> </project> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org