我有这样的接口爪哇 - 创建一个回报的方法内存根接口
public interface MQTTClient {
public void prepareAndSend(String recipient, String message);
}
出于测试目的,我想使一个配置类这样
@Configuration
public class TestServiceConfig {
@Bean
public MQTTClient mqttClient() {
return new {
public class MQTTClientImpl implements MQTTClient {
@Override
public void prepareAndSend(String recipient, String message) {
// TODO Auto-generated method stub
}
}
}
}
}
但我不知道这是更多钞票