sofastack / sofa-jarslink

Jarslink is a sofa ark plugin used to manage multi-application deployment
Apache License 2.0
3.04k stars 706 forks source link

如何实现调用模块action返回自定义对象 #31

Closed zsjnb closed 6 years ago

zsjnb commented 6 years ago

模块action返回的是内部定义的对象,调用时又没有依赖,如何实现呢?还是模块化本就不能直接依赖模块jar包?而是将模块jar包放在classpath下,action入参出参都只能是jdk自带的

luairan commented 6 years ago

按照现在的使用情况 自定义对象需要 通过第三方的jar 引入是最好的结果。 或者可以封装一个 Result

kiral commented 6 years ago

因为不同模块可能提供不同的方法,方法的入参和出参设计成自定义的类,调用时需要依赖第三方JAR。


方腾飞/kiral 并发编程网创始人

Email:tengfei@ifeve.com 微信公众号:ifeves weibo:@方腾飞-清英 Web:http://ifeve.com

On 29 Mar 2018, at 5:29 PM, zsjnb notifications@github.com wrote:

模块action返回的是内部定义的对象,调用时又没有依赖,如何实现呢?还是模块化本就不能直接依赖模块jar包?而是将模块jar包放在classpath下,action入参出参都只能是jdk自带的

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alibaba/jarslink/issues/31, or mute the thread https://github.com/notifications/unsubscribe-auth/ADpZWEM7SEcJvXBjVprhifywqwaevPKMks5tjKmGgaJpZM4TABhy.