refactor: rename webflux

This commit is contained in:
ReaJason
2025-01-18 18:28:46 +08:00
parent fe1a443c0d
commit 363d0591dc
5 changed files with 6 additions and 9 deletions
@@ -2,7 +2,6 @@ package com.reajason.javaweb;
import com.reajason.javaweb.memshell.AbstractShell; import com.reajason.javaweb.memshell.AbstractShell;
import com.reajason.javaweb.memshell.SpringWebFluxShell; import com.reajason.javaweb.memshell.SpringWebFluxShell;
import com.reajason.javaweb.memshell.WebSphereShell;
import com.reajason.javaweb.memshell.config.*; import com.reajason.javaweb.memshell.config.*;
import com.reajason.javaweb.memshell.packer.Packer; import com.reajason.javaweb.memshell.packer.Packer;
import com.reajason.javaweb.memshell.utils.CommonUtil; import com.reajason.javaweb.memshell.utils.CommonUtil;
@@ -12,8 +11,6 @@ import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
/** /**
* @author ReaJason * @author ReaJason
@@ -23,7 +20,7 @@ public class GeneratorMain {
public static void main(String[] args) throws IOException { public static void main(String[] args) throws IOException {
ShellConfig shellConfig = ShellConfig.builder() ShellConfig shellConfig = ShellConfig.builder()
.server(Server.SpringWebflux) .server(Server.SpringWebFlux)
.shellTool(ShellTool.Godzilla) .shellTool(ShellTool.Godzilla)
.shellType(SpringWebFluxShell.NETTY_HANDLER) .shellType(SpringWebFluxShell.NETTY_HANDLER)
.targetJreVersion(Opcodes.V1_8) .targetJreVersion(Opcodes.V1_8)
@@ -36,9 +36,9 @@ public enum Server {
SpringWebMvc(new SpringWebMvcShell()), SpringWebMvc(new SpringWebMvcShell()),
/** /**
* Spring Webflux 框架 * Spring WebFlux 框架
*/ */
SpringWebflux(new SpringWebFluxShell()), SpringWebFlux(new SpringWebFluxShell()),
/** /**
* WebSphere 中间件 * WebSphere 中间件
@@ -71,7 +71,7 @@ public class CommonUtil {
case Jetty -> "org.eclipse.jetty.servlet.handlers"; case Jetty -> "org.eclipse.jetty.servlet.handlers";
case Undertow, JBossEAP7, WildFly -> "io.undertow.servlet.handlers"; case Undertow, JBossEAP7, WildFly -> "io.undertow.servlet.handlers";
case SpringWebMvc -> "org.springframework.boot.mvc.handlers"; case SpringWebMvc -> "org.springframework.boot.mvc.handlers";
case SpringWebflux -> "org.springframework.boot.webflux.handlers"; case SpringWebFlux -> "org.springframework.boot.webflux.handlers";
case WebSphere -> "com.ibm.ws.webcontainer.handlers"; case WebSphere -> "com.ibm.ws.webcontainer.handlers";
case WebLogic -> "weblogic.servlet.internal.handlers"; case WebLogic -> "weblogic.servlet.internal.handlers";
case Resin -> "com.caucho.server.dispatch.handlers"; case Resin -> "com.caucho.server.dispatch.handlers";
@@ -62,7 +62,7 @@ public class SpringBoot2WebFluxContainerTest {
@ParameterizedTest(name = "{0}|{1}{2}|{3}") @ParameterizedTest(name = "{0}|{1}{2}|{3}")
@MethodSource("casesProvider") @MethodSource("casesProvider")
void test(String imageName, String shellType, ShellTool shellTool, Packer.INSTANCE packer) { void test(String imageName, String shellType, ShellTool shellTool, Packer.INSTANCE packer) {
testShellInjectAssertOk(getUrl(container), Server.SpringWebflux, shellType, shellTool, Opcodes.V1_8, packer); testShellInjectAssertOk(getUrl(container), Server.SpringWebFlux, shellType, shellTool, Opcodes.V1_8, packer);
} }
public static String getUrl(GenericContainer<?> container) { public static String getUrl(GenericContainer<?> container) {
@@ -61,7 +61,7 @@ public class SpringBoot3WebFluxContainerTest {
@ParameterizedTest(name = "{0}|{1}{2}|{3}") @ParameterizedTest(name = "{0}|{1}{2}|{3}")
@MethodSource("casesProvider") @MethodSource("casesProvider")
void test(String imageName, String shellType, ShellTool shellTool, Packer.INSTANCE packer) { void test(String imageName, String shellType, ShellTool shellTool, Packer.INSTANCE packer) {
testShellInjectAssertOk(getUrl(container), Server.SpringWebflux, shellType, shellTool, Opcodes.V17, packer); testShellInjectAssertOk(getUrl(container), Server.SpringWebFlux, shellType, shellTool, Opcodes.V17, packer);
} }
public static String getUrl(GenericContainer<?> container) { public static String getUrl(GenericContainer<?> container) {