practiceinterface工程的pom.xml内容如下,非常简单:
<?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 "> <parent> <artifactId>dubbopractice</artifactId> <groupId>com.bolingcavalry</groupId> <version>1.0-SNAPSHOT</version> <relativePath>../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <groupId>com.bolingcavalry</groupId> <artifactId>practiceinterface</artifactId> <version>1.0-SNAPSHOT</version> <name>practiceinterface</name> <description>Beans of all app</description> </project>此工程目前只有一个接口定义,后面多个子工程都会用到:
package com.bolingcavalry.dubbopractice.service; public interface DemoService { String sayHello(String name); } 编码(服务提供方)