mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-17 08:25:48 +00:00
Merge branch 'main' into feat_storage
This commit is contained in:
+115
-14
@@ -6,42 +6,31 @@
|
||||
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>boot</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<zfoo.version>3.0</zfoo.version>
|
||||
|
||||
<zfoo.version>3.1.0</zfoo.version>
|
||||
<!-- spring and spring boot -->
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<spring.boot.version>3.1.3</spring.boot.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
<!-- bytecode enhancement(字节码增强) -->
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<bytebuddy.version>1.14.6</bytebuddy.version>
|
||||
|
||||
<!-- network framework -->
|
||||
<netty.version>4.1.97.Final</netty.version>
|
||||
|
||||
<!-- zookeeper -->
|
||||
<curator.version>5.5.0</curator.version>
|
||||
|
||||
<!-- hardware detection(硬件检测) -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
|
||||
<!-- database and cache -->
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
|
||||
<!-- Office document parsing(office文档解析包) -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
|
||||
<!-- maven core plugin(maven核心插件) -->
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
@@ -49,10 +38,12 @@
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
|
||||
|
||||
<project.build.sourceEncoding>${file.encoding}</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>${file.encoding}</maven.compiler.encoding>
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -183,7 +174,117 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>boot</name>
|
||||
<description>zfoo boot</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>jaysunxiao</name>
|
||||
<email>jaysunxiao@gmail.com</email>
|
||||
<url>https://github.com/godotg</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>The zfoo Authors</name>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</organization>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>https://github.com/zfoo-project/zfoo.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:zfoo-project/zfoo.git</developerConnection>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</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>3.3.0</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>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.context.annotation.ImportRuntimeHints;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ImportRuntimeHints(GraalvmProtocolHints.class)
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.springframework.context.annotation.Import;
|
||||
* and when each bean is injected into the IOC container, it will pass through the EventRegisterProcessor.
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Import({EventRegisterProcessor.class})
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.context.annotation.ImportRuntimeHints;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(NetConfig.class)
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.context.annotation.ImportRuntimeHints;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(OrmConfig.class)
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class SchedulerAutoConfiguration {
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.springframework.context.annotation.ImportRuntimeHints;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnBean(StorageConfig.class)
|
||||
|
||||
@@ -17,7 +17,6 @@ import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class MainTest {
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
|
||||
#######################################################################################################################
|
||||
# @author godotg
|
||||
# @version 3.0
|
||||
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "deploy.sh script use error, command parameter is illegal"
|
||||
|
||||
+113
-14
@@ -6,42 +6,31 @@
|
||||
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>event</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<zfoo.version>3.0</zfoo.version>
|
||||
|
||||
<zfoo.version>3.1.0</zfoo.version>
|
||||
<!-- spring and spring boot -->
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<spring.boot.version>3.1.3</spring.boot.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
<!-- bytecode enhancement(字节码增强) -->
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<bytebuddy.version>1.14.6</bytebuddy.version>
|
||||
|
||||
<!-- network framework -->
|
||||
<netty.version>4.1.97.Final</netty.version>
|
||||
|
||||
<!-- zookeeper -->
|
||||
<curator.version>5.5.0</curator.version>
|
||||
|
||||
<!-- hardware detection(硬件检测) -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
|
||||
<!-- database and cache -->
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
|
||||
<!-- Office document parsing(office文档解析包) -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
|
||||
<!-- maven core plugin(maven核心插件) -->
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
@@ -49,10 +38,12 @@
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
|
||||
|
||||
<project.build.sourceEncoding>${file.encoding}</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>${file.encoding}</maven.compiler.encoding>
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -152,8 +143,116 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>event</name>
|
||||
<description>zfoo event</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>jaysunxiao</name>
|
||||
<email>jaysunxiao@gmail.com</email>
|
||||
<url>https://github.com/godotg</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>The zfoo Authors</name>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</organization>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>https://github.com/zfoo-project/zfoo.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:zfoo-project/zfoo.git</developerConnection>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</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>3.3.0</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>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.concurrent.ExecutorService;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class EventContext implements ApplicationListener<ApplicationContextEvent>, Ordered {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ package com.zfoo.event.anno;
|
||||
* event bus thread type
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public enum Bus {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.lang.annotation.*;
|
||||
* Receive annotations for events (observers).
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -26,7 +26,6 @@ import java.lang.reflect.Modifier;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class EnhanceUtils {
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.lang.reflect.Method;
|
||||
* 动态代理被EventReceiver注解标注的方法,为了避免反射最终会用javassist字节码增强的方法去代理EventReceiverDefinition
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class EventReceiverDefinition implements IEventReceiver {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.event.model.IEvent;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IEventReceiver {
|
||||
Bus bus();
|
||||
|
||||
@@ -36,7 +36,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class EventBus {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.context.event.ApplicationContextEvent;
|
||||
* 启动顺序为:AppStartBeforeEvent -> AppStartEvent -> AppStartAfterEvent
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class AppStartAfterEvent extends ApplicationContextEvent {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.context.event.ApplicationContextEvent;
|
||||
* 启动顺序为:AppStartBeforeEvent -> AppStartEvent -> AppStartAfterEvent
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class AppStartBeforeEvent extends ApplicationContextEvent {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.context.event.ApplicationContextEvent;
|
||||
* 启动顺序为:AppStartBeforeEvent -> AppStartEvent -> AppStartAfterEvent
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class AppStartEvent extends ApplicationContextEvent {
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.zfoo.protocol.util.RandomUtils;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IEvent {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class EventDefinitionParser implements BeanDefinitionParser {
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.lang.reflect.Modifier;
|
||||
* 断点发现 在AbstractAutowireCapableBeanFactory或调用getBeanPostProcessors,这样子每一个Bean创建后都会走postProcessAfterInitialization这个方法
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class EventRegisterProcessor implements BeanPostProcessor {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class NamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ApplicationTest {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Component
|
||||
public class MyController1 {
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Component
|
||||
public class MyController2 {
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.event.model.IEvent;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class MyNoticeEvent implements IEvent {
|
||||
|
||||
|
||||
+115
-14
@@ -6,42 +6,31 @@
|
||||
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>hotswap</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<zfoo.version>3.0</zfoo.version>
|
||||
|
||||
<zfoo.version>3.1.0</zfoo.version>
|
||||
<!-- spring and spring boot -->
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<spring.boot.version>3.1.3</spring.boot.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
<!-- bytecode enhancement(字节码增强) -->
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<bytebuddy.version>1.14.6</bytebuddy.version>
|
||||
|
||||
<!-- network framework -->
|
||||
<netty.version>4.1.97.Final</netty.version>
|
||||
|
||||
<!-- zookeeper -->
|
||||
<curator.version>5.5.0</curator.version>
|
||||
|
||||
<!-- hardware detection(硬件检测) -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
|
||||
<!-- database and cache -->
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
|
||||
<!-- Office document parsing(office文档解析包) -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
|
||||
<!-- maven core plugin(maven核心插件) -->
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
@@ -49,10 +38,12 @@
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
|
||||
|
||||
<project.build.sourceEncoding>${file.encoding}</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>${file.encoding}</maven.compiler.encoding>
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -162,7 +153,117 @@
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>hotswap</name>
|
||||
<description>zfoo hotswap</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>jaysunxiao</name>
|
||||
<email>jaysunxiao@gmail.com</email>
|
||||
<url>https://github.com/godotg</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>The zfoo Authors</name>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</organization>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>https://github.com/zfoo-project/zfoo.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:zfoo-project/zfoo.git</developerConnection>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</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>3.3.0</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>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.zfoo.hotswap.service.HotSwapServiceMBean;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class HotSwapContext {
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class HotSwapManager implements IHotSwapManager {
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IHotSwapManager {
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.zfoo.hotswap.model;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ClassFileDef {
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ import java.util.Map;
|
||||
* 实现类,类名必须为接口sufixMBean的前缀。也就是Hello。如果不按这个命名注册MBean就会有问题。
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
|
||||
@MXBean
|
||||
|
||||
@@ -4,7 +4,6 @@ import javax.management.MXBean;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@MXBean
|
||||
public interface IHotSwapServiceMBean {
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.lang.instrument.ClassDefinition;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class HotSwapUtils {
|
||||
|
||||
|
||||
+116
-14
@@ -6,42 +6,31 @@
|
||||
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>monitor</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<zfoo.version>3.0</zfoo.version>
|
||||
|
||||
<zfoo.version>3.1.0</zfoo.version>
|
||||
<!-- spring and spring boot -->
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<spring.boot.version>3.1.3</spring.boot.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
<!-- bytecode enhancement(字节码增强) -->
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<bytebuddy.version>1.14.6</bytebuddy.version>
|
||||
|
||||
<!-- network framework -->
|
||||
<netty.version>4.1.97.Final</netty.version>
|
||||
|
||||
<!-- zookeeper -->
|
||||
<curator.version>5.5.0</curator.version>
|
||||
|
||||
<!-- hardware detection(硬件检测) -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
|
||||
<!-- database and cache -->
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
|
||||
<!-- Office document parsing(office文档解析包) -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
|
||||
<!-- maven core plugin(maven核心插件) -->
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
@@ -49,11 +38,14 @@
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
|
||||
|
||||
<project.build.sourceEncoding>${file.encoding}</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>${file.encoding}</maven.compiler.encoding>
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zfoo</groupId>
|
||||
@@ -156,7 +148,117 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>monitor</name>
|
||||
<description>zfoo monitor</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>jaysunxiao</name>
|
||||
<email>jaysunxiao@gmail.com</email>
|
||||
<url>https://github.com/godotg</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>The zfoo Authors</name>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</organization>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>https://github.com/zfoo-project/zfoo.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:zfoo-project/zfoo.git</developerConnection>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</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>3.3.0</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>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.zfoo.scheduler.util.TimeUtils;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class DiskFileSystem implements Comparable<DiskFileSystem> {
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ package com.zfoo.monitor;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class DiskStorage implements Comparable<DiskStorage> {
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@ import java.lang.management.MemoryUsage;
|
||||
|
||||
/**
|
||||
* @author yh
|
||||
* @date 2022/10/10 下午6:44
|
||||
*/
|
||||
|
||||
public class JvmMemory {
|
||||
private String name;
|
||||
private double total;
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.zfoo.scheduler.util.TimeUtils;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class Memory implements Comparable<Memory> {
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class Monitor {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.scheduler.util.TimeUtils;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class Sar implements Comparable<Sar> {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.zfoo.scheduler.util.TimeUtils;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class Uptime implements Comparable<Uptime> {
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yh
|
||||
* @date 2022/10/10 下午6:42
|
||||
*/
|
||||
public class JvmUtils {
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ import java.util.stream.Collectors;
|
||||
* Oshi库封装的工具类,通过此工具类,可获取系统、硬件相关信息
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class OSUtils {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import oshi.SystemInfo;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ApplicationTest {
|
||||
|
||||
|
||||
+114
-14
@@ -6,42 +6,31 @@
|
||||
|
||||
<groupId>com.zfoo</groupId>
|
||||
<artifactId>net</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.1.0</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<zfoo.version>3.0</zfoo.version>
|
||||
|
||||
<zfoo.version>3.1.0</zfoo.version>
|
||||
<!-- spring and spring boot -->
|
||||
<spring.version>6.0.11</spring.version>
|
||||
<spring.boot.version>3.1.3</spring.boot.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
|
||||
<!-- bytecode enhancement(字节码增强) -->
|
||||
<javassist.version>3.29.2-GA</javassist.version>
|
||||
<bytebuddy.version>1.14.6</bytebuddy.version>
|
||||
|
||||
<!-- network framework -->
|
||||
<netty.version>4.1.97.Final</netty.version>
|
||||
|
||||
<!-- zookeeper -->
|
||||
<curator.version>5.5.0</curator.version>
|
||||
|
||||
<!-- hardware detection(硬件检测) -->
|
||||
<oshi.version>6.4.5</oshi.version>
|
||||
|
||||
<!-- database and cache -->
|
||||
<mongodb-driver-sync.version>4.10.2</mongodb-driver-sync.version>
|
||||
<caffeine.version>3.1.8</caffeine.version>
|
||||
|
||||
<!-- Office document parsing(office文档解析包) -->
|
||||
<poi.version>5.2.3</poi.version>
|
||||
<csv.version>1.10.0</csv.version>
|
||||
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
|
||||
<!-- maven core plugin(maven核心插件) -->
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
|
||||
@@ -49,10 +38,12 @@
|
||||
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
|
||||
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
|
||||
<maven-shade-plugin.version>3.5.0</maven-shade-plugin.version>
|
||||
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
|
||||
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
|
||||
|
||||
<project.build.sourceEncoding>${file.encoding}</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>${file.encoding}</maven.compiler.encoding>
|
||||
<java.version>17</java.version>
|
||||
<file.encoding>UTF-8</file.encoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -215,8 +206,117 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>${maven-deploy-plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<name>net</name>
|
||||
<description>zfoo net</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>jaysunxiao</name>
|
||||
<email>jaysunxiao@gmail.com</email>
|
||||
<url>https://github.com/godotg</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<organization>
|
||||
<name>The zfoo Authors</name>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</organization>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<connection>https://github.com/zfoo-project/zfoo.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:zfoo-project/zfoo.git</developerConnection>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>ossrh</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</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>3.3.0</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>3.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -41,7 +41,6 @@ import java.util.concurrent.ExecutorService;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class NetContext implements ApplicationListener<ApplicationContextEvent>, Ordered {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ConfigManager implements IConfigManager {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.consumer.registry.IRegistry;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IConfigManager {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ConsumerConfig {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ConsumerModule {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class MonitorConfig {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class NetConfig {
|
||||
private String id;
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ProviderConfig {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ProviderModule {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class RegistryConfig {
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ import java.util.concurrent.TimeoutException;
|
||||
* 在clientSession中选择一个可用的session,最终还是调用的IRouter中的方法
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class Consumer implements IConsumer {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IConsumer {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class AbstractConsumerLoadBalancer implements IConsumerLoadBalancer {
|
||||
|
||||
|
||||
-1
@@ -33,7 +33,6 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||
* 通过argument计算一致性hash
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ConsistentHashConsumerLoadBalancer extends AbstractConsumerLoadBalancer {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IConsumerLoadBalancer {
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.zfoo.protocol.util.RandomUtils;
|
||||
* 随机负载均衡器,任选服务提供者的其中之一
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class RandomConsumerLoadBalancer extends AbstractConsumerLoadBalancer {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ConsumerStartEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IRegistry {
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class RegisterVO {
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ import java.util.stream.Collectors;
|
||||
* 服务注册,服务发现
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ZookeeperRegistry implements IRegistry {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ZookeeperRegistry.class);
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class AbstractClient<C extends Channel> extends ChannelInitializer<C> implements IClient {
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public abstract class AbstractServer<C extends Channel> extends ChannelInitializer<C> implements IServer {
|
||||
private static final Logger logger = LoggerFactory.getLogger(AbstractServer.class);
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.*;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class HostAndPort {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IClient {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ package com.zfoo.net.core;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IServer {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author tingyanshen
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ClientSessionActiveEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ClientSessionInactiveEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author meiw
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ServerExceptionEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author tingyanshen
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ServerSessionActiveEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.net.session.Session;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class ServerSessionInactiveEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class GatewayServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ package com.zfoo.net.core.gateway;
|
||||
* 网关负载均衡使用计算一致性hash的参数,如果packet继承了这个接口,则网关的一致性hash负载均衡优先使用这个接口计算一致性hash;
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public interface IGatewayLoadBalancer {
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class WebsocketGatewayServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class WebsocketSslGatewayServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.protocol.anno.Protocol;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Protocol(id = 22)
|
||||
public class AuthUidAsk {
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.zfoo.protocol.anno.Protocol;
|
||||
* 网关登录成功过后,将uid授权给网关
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Protocol(id = 20)
|
||||
public class AuthUidToGatewayCheck {
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.zfoo.protocol.anno.Protocol;
|
||||
* 网关登录成功过后,将uid授权给网关的返回
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Protocol(id = 21)
|
||||
public class AuthUidToGatewayConfirm {
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.event.model.IEvent;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class AuthUidToGatewayEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.protocol.anno.Protocol;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Protocol(id = 23)
|
||||
public class GatewaySessionInactiveAsk {
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.zfoo.event.model.IEvent;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class GatewaySessionInactiveEvent implements IEvent {
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.Map;
|
||||
* 同步网关的session信息到push
|
||||
*
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
@Protocol(id = 24)
|
||||
public class GatewaySynchronizeSidAsk {
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class HttpServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.function.BiFunction;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class JProtobufGatewayServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import io.netty.handler.timeout.IdleStateHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class JProtobufTcpClient extends AbstractClient<SocketChannel> {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import io.netty.handler.timeout.IdleStateHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class JProtobufTcpServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import io.netty.handler.stream.ChunkedWriteHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class JsonWebsocketClient extends AbstractClient<SocketChannel> {
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import io.netty.handler.stream.ChunkedWriteHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class JsonWebsocketServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import io.netty.handler.timeout.IdleStateHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class TcpClient extends AbstractClient<SocketChannel> {
|
||||
public TcpClient(HostAndPort host) {
|
||||
|
||||
@@ -23,7 +23,6 @@ import io.netty.handler.timeout.IdleStateHandler;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class TcpServer extends AbstractServer<SocketChannel> {
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import io.netty.channel.socket.nio.NioDatagramChannel;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class UdpClient extends AbstractClient<Channel> {
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
public class UdpServer extends AbstractServer<Channel> {
|
||||
private static final Logger logger = LoggerFactory.getLogger(UdpServer.class);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user