Skip to content

Commit d45cb62

Browse files
committed
fix: add newInstance for AviatorPacker
1 parent 1a3a3f8 commit d45cb62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packer/src/main/java/com/reajason/javaweb/packer/aviator/AviatorPacker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @since 2024/12/13
99
*/
1010
public class AviatorPacker implements Packer {
11-
String template = "use org.springframework.cglib.core.*;use org.springframework.util.*;ReflectUtils.defineClass('{{className}}', Base64Utils.decodeFromString('{{base64Str}}'), ReflectionUtils.invokeMethod(ClassUtils.getMethod(Class.forName('java.lang.Thread'), 'getContextClassLoader', nil), Thread.currentThread()));";
11+
String template = "use org.springframework.cglib.core.*;use org.springframework.util.*;ReflectUtils.newInstance(ReflectUtils.defineClass('{{className}}', Base64Utils.decodeFromString('{{base64Str}}'), ReflectionUtils.invokeMethod(ClassUtils.getMethod(Class.forName('java.lang.Thread'), 'getContextClassLoader', nil), Thread.currentThread())));";
1212

1313
@Override
1414
public String pack(ClassPackerConfig config) {

0 commit comments

Comments
 (0)