This commit is contained in:
ybwei 2022-06-29 15:56:37 +08:00
parent 01af19dc42
commit 619c296c75
13 changed files with 117 additions and 9 deletions

View File

@ -4,7 +4,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ybw</groupId>
<artifactId>spi-jdk-demo</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<modules>
<module>spi-service</module>
<module>spi-service-impl-one</module>
<module>spi-service-impl-two</module>
<module>spi-execute</module>
</modules>
<name>spi-jdk-demo</name>
<description>SPI全称Service Provider Interface服务提供者接口</description>

View File

@ -0,0 +1,26 @@
<?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>
<artifactId>spi-jdk-demo</artifactId>
<groupId>com.ybw</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spi-execute</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spi-service-impl-one</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,6 @@
package com.ybw.spi.jdk.demo.app;
package com.ybw.spi.test;
import com.ybw.spi.jdk.demo.service.DemoService;
import com.ybw.spi.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

View File

@ -0,0 +1,27 @@
<?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>
<artifactId>spi-jdk-demo</artifactId>
<groupId>com.ybw</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spi-service-impl-one</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spi-service</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,7 @@
package com.ybw.spi.jdk.demo.service.impl;
package com.ybw.spi.service.impl;
import com.ybw.spi.jdk.demo.service.DemoService;
import com.ybw.spi.service.DemoService;
/**
* Implement for DemoService

View File

@ -0,0 +1 @@
com.ybw.spi.service.impl.DemoOneServiceImpl

View File

@ -0,0 +1,27 @@
<?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>
<artifactId>spi-jdk-demo</artifactId>
<groupId>com.ybw</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spi-service-impl-two</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spi-service</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,7 @@
package com.ybw.spi.jdk.demo.service.impl;
package com.ybw.spi.service.impl;
import com.ybw.spi.jdk.demo.service.DemoService;
import com.ybw.spi.service.DemoService;
/**
* Implement for DemoService

View File

@ -0,0 +1 @@
com.ybw.spi.service.impl.DemoTwoServiceImpl

View File

@ -0,0 +1,19 @@
<?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>
<artifactId>spi-jdk-demo</artifactId>
<groupId>com.ybw</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spi-service</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
</project>

View File

@ -1,2 +0,0 @@
com.ybw.spi.jdk.demo.service.impl.DemoOneServiceImpl
com.ybw.spi.jdk.demo.service.impl.DemoTwoServiceImpl