我有這樣的接口爪哇 - 創建一個回報的方法內存根接口
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
}
}
}
}
}
但我不知道這是更多鈔票