3 Ağustos 2020 Pazartesi

Camel Service Arayüzü

Örnek
Şöyle yaparız
@Service("myService")
public class MyService implements org.apache.camel.Service {

  @Override
  public void start() throws Exception {
    ...
  }

  @Override
  public void stop() throws Exception {
    ...
  }
    
}
Kullanmak için şöyle yaparız
@Autowired
private MyService myService;
@Autowired
private CamelContext context;

@PostConstruct
public void setupCamelContext() throws Exception {
  ....
  context.addService(myService);
}

Hiç yorum yok:

Yorum Gönder