IDEA 2021.1 MyURLStreamHandler bug for jar path

Answered

I found one of idea's bug, there was no this bug in the previous version 2020.3.
In my developed IDEA plugin, to init my spring beans, I used @ComponentScan, I set basePackages is "com.xxx.aaa.idea.gui", but I debug found the path is not "com.xxx.aaa.idea.gui", it is ""com.xxx.aaa.idea", it remove "gui".
Deep debug I found 2021.1 used com.intellij.util.lang.ZipResourceFile$MyURLStreamHandler, but 2020.3 used sun.net.www.protocol.jar.Handler, the reason is this.
How can I solve this problem now?

5 comments
Comment actions Permalink

I temporarily bypassed it in another way.

I listed all the classes to be registered and registered them one by one, but this way is very troublesome. I hope to solve this problem as soon as possible.

0
Comment actions Permalink

Do I understand correctly that you establish a Spring context inside your plugin? Please see https://youtrack.jetbrains.com/issue/IDEA-264777 which seems related.

0
Comment actions Permalink

So, can't I use Spring context with @ComponentScan init beans in the new version of IDEA plug-in?

0
Comment actions Permalink

Could you please share you code where you initialize Spring Context? (Why do you need Spring at all?)

0
Comment actions Permalink

We need to generate a spring container for each idea project to manage.

0

Please sign in to leave a comment.