We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sandbox中javax.servlet下的类都由SandboxClassLoader加载。在我自己的demo项目中,以增强HttpServlet中service为例,如果直接将入参对象转化为HttpServletRequest会出现由于classLoader不一样而引发的java.lang.ClassCastException。想请教一下sandbox-repeater中是怎么做到可以直接进行类型转化的呀 private ModuleJarClassLoader(final File moduleJarFile, final File tempModuleJarFile, final Routing... specialRouting) throws IOException { super( new URL[]{new URL("file:" + tempModuleJarFile.getPath())}, assembleRouting(new Routing( ModuleJarClassLoader.class.getClassLoader(), "^com\\.alibaba\\.jvm\\.sandbox\\.api\\..*$", "^javax\\.servlet\\..*$", "^javax\\.annotation\\.Resource.*$" ), specialRouting) ); // ... }
private ModuleJarClassLoader(final File moduleJarFile, final File tempModuleJarFile, final Routing... specialRouting) throws IOException { super( new URL[]{new URL("file:" + tempModuleJarFile.getPath())}, assembleRouting(new Routing( ModuleJarClassLoader.class.getClassLoader(), "^com\\.alibaba\\.jvm\\.sandbox\\.api\\..*$", "^javax\\.servlet\\..*$", "^javax\\.annotation\\.Resource.*$" ), specialRouting) ); // ... }
The text was updated successfully, but these errors were encountered:
相同疑问 +1
Sorry, something went wrong.
+1 也遇到相同问题
No branches or pull requests
sandbox中javax.servlet下的类都由SandboxClassLoader加载。在我自己的demo项目中,以增强HttpServlet中service为例,如果直接将入参对象转化为HttpServletRequest会出现由于classLoader不一样而引发的java.lang.ClassCastException。想请教一下sandbox-repeater中是怎么做到可以直接进行类型转化的呀
private ModuleJarClassLoader(final File moduleJarFile, final File tempModuleJarFile, final Routing... specialRouting) throws IOException { super( new URL[]{new URL("file:" + tempModuleJarFile.getPath())}, assembleRouting(new Routing( ModuleJarClassLoader.class.getClassLoader(), "^com\\.alibaba\\.jvm\\.sandbox\\.api\\..*$", "^javax\\.servlet\\..*$", "^javax\\.annotation\\.Resource.*$" ), specialRouting) ); // ... }
The text was updated successfully, but these errors were encountered: