我想尝试这个示例,然后创建一个项目并在Mule Studio中创建一个java类 之后我复制了这段代码:
package org.mule.module.twilio;
import org.mule.api.annotations.Configurable;
import org.mule.api.annotations.Module;
import org.mule.api.annotations.Processor;
import org.mule.api.annotations.lifecycle.Start;
import org.mule.api.annotations.param.Optional;
import org.mule.api.callback.HttpCallback;
@Module(name = "twilio")
public class TwilioConnector {
/**
* The account sid to be used to connect to Twilio.
*/
@Configurable
private String accountSid;
/**
* The authentication token to be used to connect to Twilio
*/
@Configurable
private String authToken;
private TwilioClient twilioClient;
@Start
public void createTwilioClient() {
twilioClient = new TwilioClient(accountSid, authToken);
}
}
但我有很多错误: 所有
The import org.mule.api.annotations.Configurable cannot be resolved
The import org.mule.api.annotations.Module cannot be resolved
The import org.mule.api.annotations.Processor cannot be resolved
The import org.mule.api.annotations.lifecycle cannot be resolved
The import org.mule.api.annotations.param.Optional cannot be resolved
The import org.mule.api.callback cannot be resolved
所有clsaa进口都不知道 所有注释附近是:可配置无法解析为类型