zhangxinkun

Results 11 comments of zhangxinkun

@krasa Add this feature will be better, isn't it? SEE: dubreuia/intellij-plugin-save-actions#76.

* you can change the `VisTaskExecGraphPlugin#getEntryTasks()` method to these code, because there is no field `entryTasks` in `DefaultExecutionPlan`, you should use `executionQueue` instead ``` private Set getEntryTasks(ExecutionPlan tep) { Set...

:scream: The issue makes AlertDialog(KMP 1.5) can not use with Swing too

Why is it still not fixed in 2023 with version 1.4.3?? Java 17 is so popular today :stuck_out_tongue_closed_eyes:

以及 PluginListableBeanFactory 未传递插件平台的parentBeanFactory,导致插件的feign无法拿到插件平台的load balance

@hnzhrh 思路:用annotation application context作为插件的spring context,将插件平台的spring context作为插件的parent,使得插件可以优先从parent中获取bean。 以及,考虑自定义插件的application context的classloader,在加载class时优先从平台(即启动插件的线程的上下文classloader)加载class,找不到再从插件jar( PluginClassLoader )加载class * 插件start逻辑 ``` applicationContext = new AnnotationConfigApplicationContext(); final String home = StringUtils.substringAfterLast(homePackage, "."); applicationContext.setBeanNameGenerator( new PluginBeanNameGenerator(StringUtils.equals(home, "plugin") ? null :...

好了我冷静完了 说一下我对插件的设计思路 我以为,IDEA有自己的插件、eclipse有自己的插件,因此,我们设计的插件系统应该是针对一个指定的服务(插件平台),而为这个服务开发的插件才可以被这个服务加载,插件大部分的依赖、spring bean都应该由平台提供。 > 常见用例: 平台提供一个interface class,而对此平台开发的插件,可以实现此接口,注册成bean,平台循环所有的插件的context,以上述interface类名拿到所有实现,已达到扩充平台端能力的目的。 那么,因此: 如果插件是springboot,那么引申而来的autoconfig、容器端口等问题过于复杂,并且这样做的意义不明: 既然插件已经是springboot,那为什么不单独启动(docker、jar) 因此,我设计的插件系统的目标: 1. 插件系统有两个依赖: 平台api和插件api。平台api是给springboot工程使用,插件api是给插件使用(包含基于p4j的自定义spring plugin父类) 2. 插件能够继承平台的spring context(反之见第三点)、可以拿到平台的所有bean;平台可以拿到某插件id的contexct、也可以拿到所有插件的context、各插件的context独立且bean不会冲突 3. 允许插件注册bean到平台的context。典型场景:controller。即,允许插件扩充controller给平台,以实现新的reset接口 4. 插件所有的能力项基本来自平台,因为context继承的缘故,插件甚至可以无缝使用包括但不限于:平台定义好的数据库、service、mq等等 5.

`org.laxture.sbp.spring.boot.SpringBootstrap` 但凡把这个文件打开一眼 我就得三天睡不着觉

如果实现了我说的第3点(插件能够继承平台的spring context),那么插件天然就能得到平台springboot创建出的TransactionManager、ConversionService。插件无需关心创建流程,直接注入即可。 对于插件本身,它的context是直接new出来的AnnotationApplicationContext。插件不需要是fat jar 建议你看看Intellij对插件平台与插件的classpath、classloader定义 对所有想用现成的spring插件框架的人说一句: 没有谁能帮你解决一个复杂的spring二创功能,有能力就自己理清思路手搓一个,没有能力就想想自己真的需要这种插件功能吗是否可以换个方式实现(比如父子独立服务)