mirror of
https://gitee.com/dromara/MilvusPlus.git
synced 2025-12-06 17:08:27 +08:00
完善 solon plugin,感谢solon作者
This commit is contained in:
parent
18cbdd9b55
commit
f15c574853
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,3 +31,5 @@ build/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
/milvus-solon-demo/
|
||||||
|
/milvus-plus-parent
|
||||||
|
|||||||
@ -2,168 +2,37 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
<groupId>io.github.javpower</groupId>
|
<groupId>io.github.javpower</groupId>
|
||||||
<artifactId>milvus-plus-boot-starter</artifactId>
|
<artifactId>milvus-plus-parent</artifactId>
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<name>milvus-plus-boot-starter</name>
|
<relativePath>../milvus-plus-parent/pom.xml</relativePath>
|
||||||
<description>a tool about milvus-plus</description>
|
</parent>
|
||||||
<url>https://github.com/javpower/milvus-plus</url>
|
<artifactId>milvus-plus-boot-starter</artifactId>
|
||||||
<licenses>
|
<packaging>jar</packaging>
|
||||||
<license>
|
|
||||||
<name> The Apache Software License, Version 2.0 </name>
|
|
||||||
<url> http://www.apache.org/licenses/LICENSE-2.0.txt </url>
|
|
||||||
<distribution> repo </distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
<scm>
|
|
||||||
<url>https://github.com/javpower/milvus-plus-boot-starter</url>
|
|
||||||
<connection>scm:git@github.com/javpower/milvus-plus.git</connection>
|
|
||||||
<developerConnection>scm:git@github.com/javpower/milvus-plus.git</developerConnection>
|
|
||||||
</scm>
|
|
||||||
<developers>
|
|
||||||
<developer>
|
|
||||||
<name>gc.x</name>
|
|
||||||
<email>javpower@163.com</email>
|
|
||||||
<organization> https://github.com/javpower</organization>
|
|
||||||
<timezone>+8</timezone>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
<properties>
|
|
||||||
<java.version>1.8</java.version>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
||||||
<spring-boot.version>2.7.13</spring-boot.version>
|
|
||||||
<mica-auto.vaersion>2.3.2</mica-auto.vaersion>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.github.javpower</groupId>
|
|
||||||
<artifactId>milvus-plus-core</artifactId>
|
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.dreamlu</groupId>
|
|
||||||
<artifactId>mica-auto</artifactId>
|
|
||||||
<version>${mica-auto.vaersion}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
<dependencies>
|
||||||
<dependencyManagement>
|
<dependency>
|
||||||
<dependencies>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<dependency>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
</dependency>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<dependency>
|
||||||
<version>${spring-boot.version}</version>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<type>pom</type>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
<scope>import</scope>
|
</dependency>
|
||||||
</dependency>
|
<dependency>
|
||||||
</dependencies>
|
<groupId>io.github.javpower</groupId>
|
||||||
</dependencyManagement>
|
<artifactId>milvus-plus-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.dreamlu</groupId>
|
||||||
|
<artifactId>mica-auto</artifactId>
|
||||||
|
<version>${mica-auto.vaersion}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<distributionManagement>
|
</dependencies>
|
||||||
<snapshotRepository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
</snapshotRepository>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url> https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
|
||||||
<version>1.6.7</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
<serverId>ossrh</serverId>
|
|
||||||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
|
||||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId> org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>2.2.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.9.1</version>
|
|
||||||
<configuration>
|
|
||||||
<show>private</show>
|
|
||||||
<nohelp>true</nohelp>
|
|
||||||
<charset>UTF-8</charset>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<docencoding>UTF-8</docencoding>
|
|
||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
</project>
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|
||||||
|
|||||||
@ -2,196 +2,65 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
<groupId>io.github.javpower</groupId>
|
<groupId>io.github.javpower</groupId>
|
||||||
<artifactId>milvus-plus-core</artifactId>
|
<artifactId>milvus-plus-parent</artifactId>
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
<version>${revision}</version>
|
||||||
<name>milvus-plus-core</name>
|
<relativePath>../milvus-plus-parent/pom.xml</relativePath>
|
||||||
<description>a tool about milvus-plus-core</description>
|
</parent>
|
||||||
<url>https://github.com/javpower/milvus-plus</url>
|
<artifactId>milvus-plus-core</artifactId>
|
||||||
<licenses>
|
<packaging>jar</packaging>
|
||||||
<license>
|
<dependencies>
|
||||||
<name> The Apache Software License, Version 2.0 </name>
|
<dependency>
|
||||||
<url> http://www.apache.org/licenses/LICENSE-2.0.txt </url>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<distribution> repo </distribution>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
</license>
|
</dependency>
|
||||||
</licenses>
|
<dependency>
|
||||||
<scm>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<url>https://github.com/javpower/milvus-plus-boot-starter</url>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<connection>scm:git@github.com/javpower/milvus-plus.git</connection>
|
<version>3.24.0</version>
|
||||||
<developerConnection>scm:git@github.com/javpower/milvus-plus.git</developerConnection>
|
</dependency>
|
||||||
</scm>
|
<dependency>
|
||||||
<developers>
|
<groupId>org.projectlombok</groupId>
|
||||||
<developer>
|
<artifactId>lombok</artifactId>
|
||||||
<name>gc.x</name>
|
<version>1.18.22</version>
|
||||||
<email>javpower@163.com</email>
|
</dependency>
|
||||||
<organization> https://github.com/javpower</organization>
|
<dependency>
|
||||||
<timezone>+8</timezone>
|
<groupId>io.milvus</groupId>
|
||||||
</developer>
|
<artifactId>milvus-sdk-java</artifactId>
|
||||||
</developers>
|
<version>2.4.0</version>
|
||||||
<properties>
|
<exclusions>
|
||||||
<java.version>1.8</java.version>
|
<exclusion>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
<spring-boot.version>2.7.13</spring-boot.version>
|
</exclusion>
|
||||||
<mica-auto.vaersion>2.3.2</mica-auto.vaersion>
|
<exclusion>
|
||||||
</properties>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
<dependencies>
|
<artifactId>hadoop-client</artifactId>
|
||||||
<dependency>
|
</exclusion>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<exclusion>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
</dependency>
|
<artifactId>jackson-dataformat-csv</artifactId>
|
||||||
<dependency>
|
</exclusion>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<exclusion>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<groupId>com.azure</groupId>
|
||||||
<version>3.24.0</version>
|
<artifactId>azure-storage-blob</artifactId>
|
||||||
</dependency>
|
</exclusion>
|
||||||
<dependency>
|
<exclusion>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>com.azure</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>azure-identity</artifactId>
|
||||||
<version>1.18.22</version>
|
</exclusion>
|
||||||
</dependency>
|
</exclusions>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>io.milvus</groupId>
|
<dependency>
|
||||||
<artifactId>milvus-sdk-java</artifactId>
|
<groupId>net.dreamlu</groupId>
|
||||||
<version>2.4.0</version>
|
<artifactId>mica-auto</artifactId>
|
||||||
<exclusions>
|
<version>${mica-auto.vaersion}</version>
|
||||||
<exclusion>
|
<scope>provided</scope>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
</dependency>
|
||||||
<artifactId>log4j-slf4j-impl</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.hadoop</groupId>
|
|
||||||
<artifactId>hadoop-client</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
||||||
<artifactId>jackson-dataformat-csv</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.azure</groupId>
|
|
||||||
<artifactId>azure-storage-blob</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.azure</groupId>
|
|
||||||
<artifactId>azure-identity</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.dreamlu</groupId>
|
|
||||||
<artifactId>mica-auto</artifactId>
|
|
||||||
<version>${mica-auto.vaersion}</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<dependencyManagement>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<type>pom</type>
|
|
||||||
<scope>import</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</dependencyManagement>
|
|
||||||
|
|
||||||
<distributionManagement>
|
|
||||||
<snapshotRepository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
|
||||||
</snapshotRepository>
|
|
||||||
<repository>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<url> https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<build>
|
</project>
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.sonatype.plugins</groupId>
|
|
||||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
|
||||||
<version>1.6.7</version>
|
|
||||||
<extensions>true</extensions>
|
|
||||||
<configuration>
|
|
||||||
<serverId>ossrh</serverId>
|
|
||||||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
|
||||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId> org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
|
||||||
<version>2.2.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>attach-sources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>jar-no-fork</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
|
||||||
<version>2.9.1</version>
|
|
||||||
<configuration>
|
|
||||||
<show>private</show>
|
|
||||||
<nohelp>true</nohelp>
|
|
||||||
<charset>UTF-8</charset>
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<docencoding>UTF-8</docencoding>
|
|
||||||
<additionalparam>-Xdoclint:none</additionalparam>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>sign-artifacts</id>
|
|
||||||
<phase>verify</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>sign</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
|
||||||
<version>2.8.2</version>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|
||||||
|
|||||||
180
milvus-plus-parent/pom.xml
Normal file
180
milvus-plus-parent/pom.xml
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-parent</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>${project.artifactId}</name>
|
||||||
|
<description>a tool about milvus-plus</description>
|
||||||
|
<url>https://github.com/javpower/milvus-plus</url>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name> The Apache Software License, Version 2.0 </name>
|
||||||
|
<url> http://www.apache.org/licenses/LICENSE-2.0.txt </url>
|
||||||
|
<distribution> repo </distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<scm>
|
||||||
|
<url>https://github.com/javpower/milvus-plus</url>
|
||||||
|
<connection>scm:git@github.com/javpower/milvus-plus.git</connection>
|
||||||
|
<developerConnection>scm:git@github.com/javpower/milvus-plus.git</developerConnection>
|
||||||
|
</scm>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<name>gc.x</name>
|
||||||
|
<email>javpower@163.com</email>
|
||||||
|
<organization> https://github.com/javpower</organization>
|
||||||
|
<timezone>+8</timezone>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
<properties>
|
||||||
|
<revision>2.4.0-SNAPSHOT</revision>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
<maven-compiler.version>3.11.0</maven-compiler.version>
|
||||||
|
<maven-assembly.version>3.6.0</maven-assembly.version>
|
||||||
|
<maven-resources.version>3.3.1</maven-resources.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<solon.version>2.7.6</solon.version>
|
||||||
|
<spring-boot.version>2.7.13</spring-boot.version>
|
||||||
|
<mica-auto.vaersion>2.3.2</mica-auto.vaersion>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-core</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-boot-starter</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-solon-plugin</artifactId>
|
||||||
|
<version>${revision}</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>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>ossrh</id>
|
||||||
|
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
<repository>
|
||||||
|
<id>ossrh</id>
|
||||||
|
<url> https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>1.8</source>
|
||||||
|
<target>1.8</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.plugins</groupId>
|
||||||
|
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||||
|
<version>1.6.7</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<serverId>ossrh</serverId>
|
||||||
|
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
||||||
|
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId> org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>2.2.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar-no-fork</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>2.9.1</version>
|
||||||
|
<configuration>
|
||||||
|
<show>private</show>
|
||||||
|
<nohelp>true</nohelp>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>../milvus-plus-core</module>
|
||||||
|
<module>../milvus-plus-solon-plugin</module>
|
||||||
|
<module>../milvus-plus-boot-starter</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
||||||
61
milvus-plus-solon-plugin/pom.xml
Executable file
61
milvus-plus-solon-plugin/pom.xml
Executable file
@ -0,0 +1,61 @@
|
|||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-parent</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
<relativePath>../milvus-plus-parent/pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<artifactId>milvus-plus-solon-plugin</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.javpower</groupId>
|
||||||
|
<artifactId>milvus-plus-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 适配插件只需要它 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>solon</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>solon.logging.logback</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>solon-api</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.noear</groupId>
|
||||||
|
<artifactId>solon-test</artifactId>
|
||||||
|
<version>${solon.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>tencent</id>
|
||||||
|
<url>https://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package io.github.javpower.solon;
|
||||||
|
|
||||||
|
import io.github.javpower.solon.entity.MilvusProperties;
|
||||||
|
import io.github.javpower.solon.service.MilvusInit;
|
||||||
|
import org.noear.solon.core.AppContext;
|
||||||
|
import org.noear.solon.core.Plugin;
|
||||||
|
|
||||||
|
public class XPlugin implements Plugin {
|
||||||
|
|
||||||
|
public void start(AppContext context) throws Throwable {
|
||||||
|
context.beanMake(MilvusProperties.class);
|
||||||
|
context.beanMake(MilvusInit.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +1,7 @@
|
|||||||
package io.github.javpower.solon.entity;
|
package io.github.javpower.solon.entity;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.Configuration;
|
||||||
import org.noear.solon.annotation.Inject;
|
import org.noear.solon.annotation.Inject;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -12,14 +10,11 @@ import java.util.List;
|
|||||||
* @author xgc
|
* @author xgc
|
||||||
**/
|
**/
|
||||||
@Data
|
@Data
|
||||||
@Component
|
@Inject("${milvus}") //see https://solon.noear.org/article/326
|
||||||
|
@Configuration
|
||||||
public class MilvusProperties {
|
public class MilvusProperties {
|
||||||
@Inject("${milvus.enable}")
|
|
||||||
private boolean enable;
|
private boolean enable;
|
||||||
@Inject("${milvus.uri}")
|
|
||||||
private String uri;
|
private String uri;
|
||||||
@Inject("${milvus.token}")
|
|
||||||
private String token;
|
private String token;
|
||||||
@Inject("${milvus.packages}")
|
|
||||||
private List<String> packages;
|
private List<String> packages;
|
||||||
}
|
}
|
||||||
@ -1,14 +1,12 @@
|
|||||||
package io.github.javpower.solon.mapper;
|
package io.github.javpower.solon.mapper;
|
||||||
|
|
||||||
import io.github.javpower.milvus.plus.core.mapper.BaseMilvusMapper;
|
import io.github.javpower.milvus.plus.core.mapper.BaseMilvusMapper;
|
||||||
import io.github.javpower.solon.service.MilvusInit;
|
|
||||||
import io.milvus.v2.client.MilvusClientV2;
|
import io.milvus.v2.client.MilvusClientV2;
|
||||||
|
import org.noear.solon.Solon;
|
||||||
|
|
||||||
public class MilvusMapper<T> extends BaseMilvusMapper<T> {
|
public class MilvusMapper<T> extends BaseMilvusMapper<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MilvusClientV2 getClient() {
|
public MilvusClientV2 getClient() {
|
||||||
return MilvusInit.client;
|
return Solon.context().getBean(MilvusClientV2.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3,38 +3,29 @@ package io.github.javpower.solon.service;
|
|||||||
import io.github.javpower.milvus.plus.service.AbstractMilvusClientBuilder;
|
import io.github.javpower.milvus.plus.service.AbstractMilvusClientBuilder;
|
||||||
import io.github.javpower.solon.entity.MilvusProperties;
|
import io.github.javpower.solon.entity.MilvusProperties;
|
||||||
import io.milvus.v2.client.MilvusClientV2;
|
import io.milvus.v2.client.MilvusClientV2;
|
||||||
import org.noear.solon.annotation.Component;
|
import org.noear.solon.annotation.*;
|
||||||
import org.noear.solon.annotation.Init;
|
|
||||||
import org.noear.solon.annotation.Inject;
|
|
||||||
import org.noear.solon.core.bean.LifecycleBean;
|
import org.noear.solon.core.bean.LifecycleBean;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
@Component
|
@Configuration
|
||||||
public class MilvusInit extends AbstractMilvusClientBuilder implements LifecycleBean {
|
public class MilvusInit extends AbstractMilvusClientBuilder implements LifecycleBean {
|
||||||
|
|
||||||
|
//see https://solon.noear.org/article/324
|
||||||
public static MilvusClientV2 client;
|
@Bean
|
||||||
@Inject
|
public MilvusClientV2 init(MilvusProperties milvusProperties) {
|
||||||
MilvusProperties milvusProperties;
|
io.github.javpower.milvus.plus.model.MilvusProperties milvusProperties1 = new io.github.javpower.milvus.plus.model.MilvusProperties();
|
||||||
|
BeanUtils.copyProperties(milvusProperties, milvusProperties1);
|
||||||
// Spring会调用这个方法来初始化client
|
|
||||||
@Init
|
|
||||||
public void initialize() {
|
|
||||||
io.github.javpower.milvus.plus.model.MilvusProperties milvusProperties1=new io.github.javpower.milvus.plus.model.MilvusProperties();
|
|
||||||
BeanUtils.copyProperties(milvusProperties,milvusProperties1);
|
|
||||||
super.setProperties(milvusProperties1);
|
super.setProperties(milvusProperties1);
|
||||||
super.initialize();
|
super.initialize();
|
||||||
client = getClient();
|
return getClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void start() throws Throwable {
|
public void start() throws Throwable {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void stop() throws Throwable {
|
public void stop() throws Throwable {
|
||||||
super.close();
|
super.close();
|
||||||
LifecycleBean.super.stop();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
solon.plugin=io.github.javpower.solon.XPlugin
|
||||||
|
solon.plugin.priority=1
|
||||||
@ -12,28 +12,29 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>io.github.javpower</groupId>
|
<groupId>io.github.javpower</groupId>
|
||||||
<artifactId>milvus-plus-solon-starter</artifactId>
|
<artifactId>milvus-solon-demo</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<description>milvus-plus-solon-starter</description>
|
<description>milvus-solon-demo</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
|
<solon.version>2.7.6</solon.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.javpower</groupId>
|
<groupId>io.github.javpower</groupId>
|
||||||
<artifactId>milvus-plus-core</artifactId>
|
<artifactId>milvus-plus-solon-plugin</artifactId>
|
||||||
<version>2.4.0-SNAPSHOT</version>
|
<version>2.4.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>solon-web</artifactId>
|
<artifactId>solon-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.noear</groupId>
|
<groupId>org.noear</groupId>
|
||||||
<artifactId>solon.logging.logback</artifactId>
|
<artifactId>solon.logging.logback</artifactId>
|
||||||
@ -48,13 +49,6 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.noear</groupId>
|
|
||||||
<artifactId>solon-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
@ -7,7 +7,7 @@ solon.app:
|
|||||||
|
|
||||||
milvus:
|
milvus:
|
||||||
uri: https://in03-a5357975ab80da7.api.gcp-us-west1.zillizcloud.com
|
uri: https://in03-a5357975ab80da7.api.gcp-us-west1.zillizcloud.com
|
||||||
token: xxx
|
token: xxxx
|
||||||
enable: true
|
enable: true
|
||||||
packages:
|
packages:
|
||||||
- io.github.javpower.solon.test.model
|
- io.github.javpower.solon.test.model
|
||||||
@ -18,12 +18,6 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.github.javpower</groupId>
|
<groupId>io.github.javpower</groupId>
|
||||||
<artifactId>milvus-plus-boot-starter</artifactId>
|
<artifactId>milvus-plus-boot-starter</artifactId>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ server:
|
|||||||
|
|
||||||
milvus:
|
milvus:
|
||||||
uri: https://in03-a5357975ab80da7.api.gcp-us-west1.zillizcloud.com
|
uri: https://in03-a5357975ab80da7.api.gcp-us-west1.zillizcloud.com
|
||||||
token: 6fab5641a3156d2666feba14390e4ef4b6d376b5dce91faed303eec91a4bdb82239b70b29eb252b981daa3170516245818d4ee12
|
token: xxx
|
||||||
enable: true
|
enable: true
|
||||||
packages:
|
packages:
|
||||||
- io.github.javpower.milvus.demo.model
|
- io.github.javpower.milvus.demo.model
|
||||||
2
pom.xml
2
pom.xml
@ -12,8 +12,10 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>milvus-core-demo</module>
|
<module>milvus-core-demo</module>
|
||||||
<module>milvus-spring-demo</module>
|
<module>milvus-spring-demo</module>
|
||||||
|
<module>milvus-solon-demo</module>
|
||||||
<module>milvus-plus-boot-starter</module>
|
<module>milvus-plus-boot-starter</module>
|
||||||
<module>milvus-plus-core</module>
|
<module>milvus-plus-core</module>
|
||||||
|
<module>milvus-plus-solon-plugin</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user