incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

关于表达式接口适配的问题

Open noear opened this issue 7 months ago • 6 comments

不同表达式之间,一般都会有不同的语法。

希望这块不要采用适配方式,采用一个固定的,没有平台限制的,轻量级表达式工具。

目上前虽然是适配,但使用时基本采用 SpEL 的语法。。。这几乎难以适配其它表达式工具。

noear avatar May 08 '25 00:05 noear

不明白你指的是什么?是AspectTransactionalInterceptor? I'm not sure what you mean. Are you referring to AspectTransactionalInterceptor?

funky-eyes avatar May 08 '25 01:05 funky-eyes

@funky-eyes 是指这个接口:

org.apache.seata.saga.engine.expression.ELExpression

第三方框架在适配时。。。虽然提供了表达式接口的适配支持。。。但在 seata 里,是采用 spel 的语法。

noear avatar May 08 '25 03:05 noear

spel是非常通用的,我不认为使用spel就与某些平台绑定,就如同主食吃米饭,而不是粗粮,这无伤大雅。 SpEL is very versatile, and I don't think using SpEL ties you to a specific platform. It's like choosing rice as a staple food instead of coarse grains—it's harmless and doesn't matter much.

funky-eyes avatar May 08 '25 05:05 funky-eyes

@funky-eyes spel 在 srping 生态内肯定是通用的。但是切换到其它生态,就不通用了。。。spel 的包里有:spring-core, spring-jcl 。。。显然与 spring 有一定的绑定。

比如:aviator,更适合 seata 2.x 的架构意图。

noear avatar May 08 '25 06:05 noear

目前saga的实现并没有与spring分离开。所以单替换spel是起不到太大作用的。 Currently, the implementation of Saga is not separated from Spring. So simply replacing SpEL won't have much of an effect.

funky-eyes avatar May 08 '25 06:05 funky-eyes

@funky-eyes 啊。。。不是说 2.0 的设计,就是为了实现与 spring 的分离。采用更开放的适配架构设计。

从 for spring,转到:for java


我们的框架就在适配中,适配的同学就碰到了这个表达式的问题。。。发现这个表达式,几乎无法适配!!!因为从语法上,没有哪个表达式跟 spel 是一样的

noear avatar May 08 '25 06:05 noear