RSocket Proxy for Prometheus monitoring
- Rename spring-cloud-dataflow-samples/tree/master/micrometer to spring-cloud-dataflow-samples/tree/master/micrometer-samples - Rename spring-cloud-dataflow-samples/tree/master/micrometer/tasks to spring-cloud-dataflow-samples/tree/master/micrometer-samples/task-apps - Add the apps under spring-cloud-dataflow-samples/tree/master/micrometer/stream-apps - Describe or cross-link the description of the new architecture in the root README - Add microsite SCDF monitoring links Resolves #122
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.example.demosource;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.stream.annotation.EnableBinding;
|
||||
import org.springframework.cloud.stream.messaging.Source;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
@EnableScheduling
|
||||
@EnableBinding(Source.class)
|
||||
@SpringBootApplication
|
||||
public class DemoSourceApplication {
|
||||
|
||||
@Autowired
|
||||
private Source source;
|
||||
|
||||
@Scheduled(fixedDelay = 1000)
|
||||
public void sendGreetingEvents() {
|
||||
this.source.output().send(MessageBuilder.withPayload("Greeting: " + new Date().toString()).build());
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoSourceApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.example.demosource;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoSourceApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user