Skip to content
New issue

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

能否自动从jar包内生成provider #62

Closed
rickyzenggan opened this issue Oct 12, 2018 · 2 comments
Closed

能否自动从jar包内生成provider #62

rickyzenggan opened this issue Oct 12, 2018 · 2 comments

Comments

@rickyzenggan
Copy link

类似最下面的代码,如果人工去编写,成本较高,最好能通过JAR包直接生成,这个功能点有没有规划去落地?
/Create the service to be injected
import {Dubbo} from 'dubbo2.js';
const demoProvider = dubbo =>
dubbo.proxyService({
dubboInterface: 'com.alibaba.dubbo.demo.DemoProvider',
version: '1.0.0',
methods: {
sayHello(name) {
return [java.String(name)];
},

echo() {},

test() {},

getUserInfo() {
return [
java.combine('com.alibaba.dubbo.demo.UserRequest', {
id: 1,
name: 'nodejs',
email: 'node@qianmi.com',
}),
];
},
},
});

@rickyzenggan
Copy link
Author

localhost:dubbo2.js-master rickyzeng$ interpret -c dubbo.json
read jar ast file /var/folders/kc/6f3gxk8n6tlc_6yys5pnw8_r0000gn/T/jexpose14339011821655624206/output/deflated.json
Translation completed

但是文件未生成,辛苦帮忙看下,如何定位,我是直接拿你库里的JAVA文件编译为JAR包后,再去转换的

@creasy2010
Copy link
Contributor

翻译师, 主要职责就是把java代码自动生成 Typescript
根据你的描述 , 我怀疑是配置文件 的entry配置的有问题.. 你的例子应该配置为entry:com.alibaba

相关的错误提示我添加了下.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants