mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support spring webflux shell generate (resolved #6)
This commit is contained in:
@@ -48,6 +48,7 @@ dependencies {
|
||||
implementation project(":common")
|
||||
implementation project(":deserialize")
|
||||
implementation project(":memshell")
|
||||
implementation project(":memshell-java8")
|
||||
implementation 'net.bytebuddy:byte-buddy:1.+'
|
||||
implementation 'javax.servlet:javax.servlet-api:3.0.1'
|
||||
implementation 'javax.websocket:javax.websocket-api:1.1'
|
||||
@@ -66,6 +67,7 @@ dependencies {
|
||||
|
||||
implementation 'org.springframework:spring-webmvc:4.3.30.RELEASE'
|
||||
implementation 'org.springframework:spring-web:4.3.30.RELEASE'
|
||||
implementation 'org.springframework:spring-webflux:5.3.24'
|
||||
implementation('org.apache.tomcat:tomcat-catalina:8.5.58') {
|
||||
exclude group: 'org.apache.tomcat', module: 'tomcat-api'
|
||||
exclude group: 'org.apache.tomcat', module: 'tomcat-juli'
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.reajason.javaweb.memshell;
|
||||
|
||||
import com.reajason.javaweb.memshell.springwebflux.command.CommandHandlerFunction;
|
||||
import com.reajason.javaweb.memshell.springwebflux.command.CommandHandlerMethod;
|
||||
import com.reajason.javaweb.memshell.springwebflux.command.CommandWebFilter;
|
||||
import com.reajason.javaweb.memshell.springwebflux.godzilla.GodzillaHandlerFunction;
|
||||
import com.reajason.javaweb.memshell.springwebflux.godzilla.GodzillaHandlerMethod;
|
||||
import com.reajason.javaweb.memshell.springwebflux.godzilla.GodzillaWebFilter;
|
||||
import com.reajason.javaweb.memshell.springwebflux.injector.SpringWebFluxHandlerFunctionInjector;
|
||||
import com.reajason.javaweb.memshell.springwebflux.injector.SpringWebFluxHandlerMethodInjector;
|
||||
import com.reajason.javaweb.memshell.springwebflux.injector.SpringWebFluxWebFilterInjector;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2024/12/24
|
||||
*/
|
||||
public class SpringWebFluxShell extends AbstractShell {
|
||||
public static final String WEB_FILTER = "WebFilter";
|
||||
public static final String HANDLER_METHOD = "HandlerMethod";
|
||||
public static final String HANDLER_FUNCTION = "HandlerFunction";
|
||||
|
||||
@Override
|
||||
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
|
||||
return Map.of(
|
||||
WEB_FILTER, Pair.of(CommandWebFilter.class, SpringWebFluxWebFilterInjector.class),
|
||||
HANDLER_METHOD, Pair.of(CommandHandlerMethod.class, SpringWebFluxHandlerMethodInjector.class),
|
||||
HANDLER_FUNCTION, Pair.of(CommandHandlerFunction.class, SpringWebFluxHandlerFunctionInjector.class)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, Pair<Class<?>, Class<?>>> getGodzillaShellMap() {
|
||||
return Map.of(
|
||||
WEB_FILTER, Pair.of(GodzillaWebFilter.class, SpringWebFluxWebFilterInjector.class),
|
||||
HANDLER_METHOD, Pair.of(GodzillaHandlerMethod.class, SpringWebFluxHandlerMethodInjector.class),
|
||||
HANDLER_FUNCTION, Pair.of(GodzillaHandlerFunction.class, SpringWebFluxHandlerFunctionInjector.class)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public enum Server {
|
||||
/**
|
||||
* Spring Webflux 框架
|
||||
*/
|
||||
SpringWebflux(null),
|
||||
SpringWebflux(new SpringWebFluxShell()),
|
||||
|
||||
/**
|
||||
* WebSphere 中间件
|
||||
|
||||
Reference in New Issue
Block a user