add: 添加对 Jakarta Servlet 的支持(SpringBoot 3.x/Tomcat 10.x)

This commit is contained in:
pen4uin
2024-08-25 18:55:49 +08:00
parent 4d43d247c1
commit 35367e7d06
30 changed files with 2062 additions and 20 deletions
@@ -3,7 +3,7 @@
<grid id="27dc6" binding="jMGPanel" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="863" height="665"/>
<xy x="20" y="20" width="891" height="665"/>
</constraints>
<properties/>
<border type="none"/>
@@ -289,7 +289,7 @@
</constraints>
<properties/>
</component>
<grid id="ff8e2" binding="BottomPanel" layout-manager="GridLayoutManager" row-count="1" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="ff8e2" binding="BottomPanel" layout-manager="GridLayoutManager" row-count="1" column-count="6" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -345,12 +345,20 @@
</component>
<component id="3a0da" class="javax.swing.JButton" binding="generateButton">
<constraints>
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
<grid row="0" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="4" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages" key="generate.text"/>
</properties>
</component>
<component id="61ba3" class="javax.swing.JCheckBox" binding="bypassJDKModuleCheckBox" default-binding="true">
<constraints>
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Bypass JDK Module"/>
</properties>
</component>
</children>
</grid>
<grid id="61400" binding="TipPanel" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
@@ -65,6 +65,7 @@ public class jMGForm {
private JPanel BottomPanel;
private JPanel TipPanel;
private JTextPane textPane;
private JCheckBox bypassJDKModuleCheckBox;
private AbstractConfig config;
@@ -106,7 +107,7 @@ public class jMGForm {
public jMGForm() {
config = new AbstractConfig();
String[] servletApiShellBox = {Constants.SHELL_LISTENER, Constants.SHELL_FILTER};
String[] servletApiShellBox = {Constants.SHELL_LISTENER, Constants.SHELL_FILTER, Constants.SHELL_JAKARTA_LISTENER,Constants.SHELL_JAKARTA_FILTER};
String[] servletApiServerBox = {Constants.SERVER_TOMCAT, Constants.SERVER_RESIN, Constants.SERVER_WEBLOGIC, Constants.SERVER_WEBSPHERE, Constants.SERVER_JETTY, Constants.SERVER_UNDERTOW, Constants.SERVER_GLASSFISH, Constants.SERVER_JBOSS};
String[] interceptorServerBox = {Constants.SERVER_SPRING_MVC};
String[] interceptorShellBox = {Constants.SHELL_INTERCEPTOR};
@@ -289,7 +290,12 @@ public class jMGForm {
}
});
bypassJDKModuleCheckBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
config.setEnableBypassJDKModule(bypassJDKModuleCheckBox.isSelected());
}
});
generateButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -23,6 +23,8 @@ public class ResultUtil {
case Constants.SHELL_LISTENER:
case Constants.SHELL_FILTER:
case Constants.SHELL_INTERCEPTOR:
case Constants.SHELL_JAKARTA_LISTENER:
case Constants.SHELL_JAKARTA_FILTER:
TextPaneUtil.successPrintln("基础信息:");
TextPaneUtil.rawPrintln("");
TextPaneUtil.rawPrintln("加密器: JAVA_AES_BASE64");