All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.coderclan.whistle.example.producer.MongoProducerApplication Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package org.coderclan.whistle.example.producer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class MongoProducerApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext c = SpringApplication.run(MongoProducerApplication.class, args);

        Notification n = c.getBean(Notification.class);
        while (true) {
            n.sendNotification();
            try {
                Thread.sleep(10 * 1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy